diff options
author | Chris Dyer <redpony@gmail.com> | 2010-02-18 22:34:17 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2010-02-18 22:34:17 -0500 |
commit | 3a7bca942d838f945c1cd0cbe5977e20c61ebc2d (patch) | |
tree | a713b450318143a1042d47d4ab73943c9931ff90 /decoder/dict_test.cc | |
parent | 4d47dbd7da0434de67ac619392d516c678e1f2ca (diff) |
check in modified ones too
Diffstat (limited to 'decoder/dict_test.cc')
-rw-r--r-- | decoder/dict_test.cc | 17 |
1 files changed, 17 insertions, 0 deletions
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 <iostream> #include <gtest/gtest.h> #include <cassert> +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(); |