diff options
author | Wouter van Oortmerssen <wvo@google.com> | 2016-08-10 11:41:38 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <wvo@google.com> | 2016-08-10 11:52:09 -0700 |
commit | 205ddb175f259d8fd9bae1cbfaf88162996799aa (patch) | |
tree | 561dcfabb5a44636d348e3890cab2006b8293bd4 /tests | |
parent | be908939dae62d1dd128de6538b5492943315706 (diff) | |
download | flatbuffers-205ddb175f259d8fd9bae1cbfaf88162996799aa.tar.gz flatbuffers-205ddb175f259d8fd9bae1cbfaf88162996799aa.tar.bz2 flatbuffers-205ddb175f259d8fd9bae1cbfaf88162996799aa.zip |
Added union namespacing test case.
Change-Id: I9a4f90889c311c454a9c19e78c7db3c79800b44e
Tested: on Linux.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test.cpp b/tests/test.cpp index cd372375..fd2352bd 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -1169,6 +1169,11 @@ void ParseUnionTest() { "table V { X:U; }" "root_type V;" "{ X:{ A:1 }, X_type: T }"), true); + // Unions must be parsable with prefixed namespace. + flatbuffers::Parser parser2; + TEST_EQ(parser2.Parse("namespace N; table A {} namespace; union U { N.A }" + "table B { e:U; } root_type B;" + "{ e_type: N_A, e: {} }"), true); } void ConformTest() { |