mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 07:58:05 +00:00
Added union namespacing test case.
Change-Id: I9a4f90889c311c454a9c19e78c7db3c79800b44e Tested: on Linux.
This commit is contained in:
@@ -1169,6 +1169,11 @@ void ParseUnionTest() {
|
|||||||
"table V { X:U; }"
|
"table V { X:U; }"
|
||||||
"root_type V;"
|
"root_type V;"
|
||||||
"{ X:{ A:1 }, X_type: T }"), true);
|
"{ 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() {
|
void ConformTest() {
|
||||||
|
|||||||
Reference in New Issue
Block a user