summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/monster_test.bfbsbin2744 -> 2840 bytes
-rw-r--r--tests/namespace_test/namespace_test2_generated.h10
-rw-r--r--tests/test.cpp4
3 files changed, 4 insertions, 10 deletions
diff --git a/tests/monster_test.bfbs b/tests/monster_test.bfbs
index e5f51fac..db123282 100644
--- a/tests/monster_test.bfbs
+++ b/tests/monster_test.bfbs
Binary files differ
diff --git a/tests/namespace_test/namespace_test2_generated.h b/tests/namespace_test/namespace_test2_generated.h
index 1831454c..d0cc5fab 100644
--- a/tests/namespace_test/namespace_test2_generated.h
+++ b/tests/namespace_test/namespace_test2_generated.h
@@ -8,16 +8,6 @@
#include "namespace_test1_generated.h"
namespace NamespaceA {
-namespace NamespaceB {
-
-struct TableInNestedNS;
-
-struct StructInNestedNS;
-
-} // namespace NamespaceB
-} // namespace NamespaceA
-
-namespace NamespaceA {
struct TableInFirstNS;
diff --git a/tests/test.cpp b/tests/test.cpp
index 42c7647a..4c3aa543 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -322,6 +322,10 @@ void ReflectionTest(uint8_t *flatbuf, size_t length) {
TEST_EQ_STR(hp_field.name()->c_str(), "hp");
TEST_EQ(hp_field.id(), 2);
TEST_EQ(hp_field.type()->base_type(), reflection::Short);
+ auto friendly_field_ptr = fields->LookupByKey("friendly");
+ TEST_NOTNULL(friendly_field_ptr);
+ TEST_NOTNULL(friendly_field_ptr->attributes());
+ TEST_NOTNULL(friendly_field_ptr->attributes()->LookupByKey("priority"));
// Now use it to dynamically access a buffer.
auto &root = *flatbuffers::GetAnyRoot(flatbuf);