From 3a7bca942d838f945c1cd0cbe5977e20c61ebc2d Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 18 Feb 2010 22:34:17 -0500 Subject: check in modified ones too --- decoder/dict_test.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'decoder/dict_test.cc') diff --git a/decoder/dict_test.cc b/decoder/dict_test.cc index 5c5d84f0..2049ec27 100644 --- a/decoder/dict_test.cc +++ b/decoder/dict_test.cc @@ -1,8 +1,13 @@ #include "dict.h" +#include "fdict.h" + +#include #include #include +using namespace std; + class DTest : public testing::Test { public: DTest() {} @@ -23,6 +28,18 @@ TEST_F(DTest, Convert) { EXPECT_EQ(d.Convert(b), "bar"); } +TEST_F(DTest, FDictTest) { + int fid = FD::Convert("First"); + EXPECT_GT(fid, 0); + EXPECT_EQ(FD::Convert(fid), "First"); + string x = FD::Escape("="); + cerr << x << endl; + EXPECT_NE(x, "="); + x = FD::Escape(";"); + cerr << x << endl; + EXPECT_NE(x, ";"); +} + int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); -- cgit v1.2.3