diff options
author | Wouter van Oortmerssen <wvo@google.com> | 2014-07-25 15:04:35 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <wvo@google.com> | 2014-07-25 15:20:24 -0700 |
commit | 9c3de1e2a0591c2526453cf85260c09e3c624189 (patch) | |
tree | 4a744a30c7338aaf8a0bb16c2b8ba227bec2c84b /tests | |
parent | bba042d72357d80542fbda6382658f4cc9fdd8e4 (diff) | |
download | flatbuffers-9c3de1e2a0591c2526453cf85260c09e3c624189.tar.gz flatbuffers-9c3de1e2a0591c2526453cf85260c09e3c624189.tar.bz2 flatbuffers-9c3de1e2a0591c2526453cf85260c09e3c624189.zip |
Extended symbolic enum parsing in JSON for integers and OR-ing.
Change-Id: Iedbd9914a1ca3897776fb92aa9a1fdfc4603da3c
Tested: on Windows and Linux
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test.cpp b/tests/test.cpp index c28be7de..f8608975 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -504,10 +504,14 @@ void ScientificTest() { } void EnumStringsTest() { - flatbuffers::Parser parser; - - TEST_EQ(parser.Parse("enum E:byte { A, B, C } table T { F:[E]; } root_type T;" - "{ F:[ A, B, \"C\" ] }"), true); + flatbuffers::Parser parser1; + TEST_EQ(parser1.Parse("enum E:byte { A, B, C } table T { F:[E]; }" + "root_type T;" + "{ F:[ A, B, \"C\", \"A B C\" ] }"), true); + flatbuffers::Parser parser2; + TEST_EQ(parser2.Parse("enum E:byte { A, B, C } table T { F:[int]; }" + "root_type T;" + "{ F:[ \"E.C\", \"E.A E.B E.C\" ] }"), true); } |