summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin T Conroy <justintconroy@users.noreply.github.com>2022-01-28 22:52:32 -0600
committerGitHub <noreply@github.com>2022-01-28 20:52:32 -0800
commit19920db39f3a4e2edbc00d92c788b6614cc4cb67 (patch)
tree99cfa93ce7a2b06a98839937da1b8f8b72537d32 /tests
parentdbbaeac85c95eda8cbed3955d969196d131372f7 (diff)
downloadflatbuffers-19920db39f3a4e2edbc00d92c788b6614cc4cb67.tar.gz
flatbuffers-19920db39f3a4e2edbc00d92c788b6614cc4cb67.tar.bz2
flatbuffers-19920db39f3a4e2edbc00d92c788b6614cc4cb67.zip
Include a SizePrefixed..HasIdentifier for c++. (#6871)
* Include a SizePrefixed..HasIdentifier for c++. * Add updated generated code.
Diffstat (limited to 'tests')
-rw-r--r--tests/arrays_test_generated.h5
-rw-r--r--tests/cpp17/generated_cpp17/monster_test_generated.h5
-rw-r--r--tests/cpp17/generated_cpp17/optional_scalars_generated.h5
-rw-r--r--tests/cpp17/generated_cpp17/union_vector_generated.h5
-rw-r--r--tests/monster_extra_generated.h5
-rw-r--r--tests/monster_test_generated.h5
-rw-r--r--tests/optional_scalars_generated.h5
-rw-r--r--tests/union_vector/union_vector_generated.h5
8 files changed, 40 insertions, 0 deletions
diff --git a/tests/arrays_test_generated.h b/tests/arrays_test_generated.h
index d5680700..007a5f5b 100644
--- a/tests/arrays_test_generated.h
+++ b/tests/arrays_test_generated.h
@@ -470,6 +470,11 @@ inline bool ArrayTableBufferHasIdentifier(const void *buf) {
buf, ArrayTableIdentifier());
}
+inline bool SizePrefixedArrayTableBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, ArrayTableIdentifier(), true);
+}
+
inline bool VerifyArrayTableBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<MyGame::Example::ArrayTable>(ArrayTableIdentifier());
diff --git a/tests/cpp17/generated_cpp17/monster_test_generated.h b/tests/cpp17/generated_cpp17/monster_test_generated.h
index 1a6f569e..ad09dacc 100644
--- a/tests/cpp17/generated_cpp17/monster_test_generated.h
+++ b/tests/cpp17/generated_cpp17/monster_test_generated.h
@@ -3727,6 +3727,11 @@ inline bool MonsterBufferHasIdentifier(const void *buf) {
buf, MonsterIdentifier());
}
+inline bool SizePrefixedMonsterBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, MonsterIdentifier(), true);
+}
+
inline bool VerifyMonsterBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<MyGame::Example::Monster>(MonsterIdentifier());
diff --git a/tests/cpp17/generated_cpp17/optional_scalars_generated.h b/tests/cpp17/generated_cpp17/optional_scalars_generated.h
index 73950777..24b5ccd7 100644
--- a/tests/cpp17/generated_cpp17/optional_scalars_generated.h
+++ b/tests/cpp17/generated_cpp17/optional_scalars_generated.h
@@ -946,6 +946,11 @@ inline bool ScalarStuffBufferHasIdentifier(const void *buf) {
buf, ScalarStuffIdentifier());
}
+inline bool SizePrefixedScalarStuffBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, ScalarStuffIdentifier(), true);
+}
+
inline bool VerifyScalarStuffBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
diff --git a/tests/cpp17/generated_cpp17/union_vector_generated.h b/tests/cpp17/generated_cpp17/union_vector_generated.h
index a6179132..aa0daf83 100644
--- a/tests/cpp17/generated_cpp17/union_vector_generated.h
+++ b/tests/cpp17/generated_cpp17/union_vector_generated.h
@@ -1214,6 +1214,11 @@ inline bool MovieBufferHasIdentifier(const void *buf) {
buf, MovieIdentifier());
}
+inline bool SizePrefixedMovieBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, MovieIdentifier(), true);
+}
+
inline bool VerifyMovieBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<Movie>(MovieIdentifier());
diff --git a/tests/monster_extra_generated.h b/tests/monster_extra_generated.h
index 4cfe719d..b27e092e 100644
--- a/tests/monster_extra_generated.h
+++ b/tests/monster_extra_generated.h
@@ -362,6 +362,11 @@ inline bool MonsterExtraBufferHasIdentifier(const void *buf) {
buf, MonsterExtraIdentifier());
}
+inline bool SizePrefixedMonsterExtraBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, MonsterExtraIdentifier(), true);
+}
+
inline bool VerifyMonsterExtraBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<MyGame::MonsterExtra>(MonsterExtraIdentifier());
diff --git a/tests/monster_test_generated.h b/tests/monster_test_generated.h
index 1d96baee..cbcbf960 100644
--- a/tests/monster_test_generated.h
+++ b/tests/monster_test_generated.h
@@ -3698,6 +3698,11 @@ inline bool MonsterBufferHasIdentifier(const void *buf) {
buf, MonsterIdentifier());
}
+inline bool SizePrefixedMonsterBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, MonsterIdentifier(), true);
+}
+
inline bool VerifyMonsterBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<MyGame::Example::Monster>(MonsterIdentifier());
diff --git a/tests/optional_scalars_generated.h b/tests/optional_scalars_generated.h
index 724c0ebd..c295ebac 100644
--- a/tests/optional_scalars_generated.h
+++ b/tests/optional_scalars_generated.h
@@ -906,6 +906,11 @@ inline bool ScalarStuffBufferHasIdentifier(const void *buf) {
buf, ScalarStuffIdentifier());
}
+inline bool SizePrefixedScalarStuffBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, ScalarStuffIdentifier(), true);
+}
+
inline bool VerifyScalarStuffBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
diff --git a/tests/union_vector/union_vector_generated.h b/tests/union_vector/union_vector_generated.h
index 489ac94e..e08df6a7 100644
--- a/tests/union_vector/union_vector_generated.h
+++ b/tests/union_vector/union_vector_generated.h
@@ -1267,6 +1267,11 @@ inline bool MovieBufferHasIdentifier(const void *buf) {
buf, MovieIdentifier());
}
+inline bool SizePrefixedMovieBufferHasIdentifier(const void *buf) {
+ return flatbuffers::BufferHasIdentifier(
+ buf, MovieIdentifier(), true);
+}
+
inline bool VerifyMovieBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<Movie>(MovieIdentifier());