projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be90893
)
Added union namespacing test case.
author
Wouter van Oortmerssen
<wvo@google.com>
Wed, 10 Aug 2016 18:41:38 +0000
(11:41 -0700)
committer
Wouter van Oortmerssen
<wvo@google.com>
Wed, 10 Aug 2016 18:52:09 +0000
(11:52 -0700)
Change-Id: I9a4f90889c311c454a9c19e78c7db3c79800b44e
Tested: on Linux.
tests/test.cpp
patch
|
blob
|
history
diff --git
a/tests/test.cpp
b/tests/test.cpp
index
cd37237
..
fd2352b
100644
(file)
--- 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() {