From 2939516fdf78df4f061c627221e232b312301417 Mon Sep 17 00:00:00 2001 From: Robert Schmidtke Date: Mon, 2 Oct 2017 17:33:40 +0200 Subject: [PATCH] generate size-prefixed monster binary as well --- tests/generate_code.sh | 1 + tests/monster_test_ps.fbs | 10 ++++++++++ tests/monsterdata_test.mops | Bin 0 -> 448 bytes 3 files changed, 11 insertions(+) create mode 100755 tests/monster_test_ps.fbs create mode 100644 tests/monsterdata_test.mops diff --git a/tests/generate_code.sh b/tests/generate_code.sh index 4b6db29b8..6e5d10bd6 100755 --- a/tests/generate_code.sh +++ b/tests/generate_code.sh @@ -15,6 +15,7 @@ # limitations under the License. ../flatc --cpp --java --csharp --go --binary --python --js --ts --php --grpc --gen-mutable --reflect-names --gen-object-api --no-includes --cpp-ptr-type flatbuffers::unique_ptr --no-fb-import -I include_test monster_test.fbs monsterdata_test.json +../flatc -b --prefix-size -I include_test monster_test_ps.fbs monsterdata_test.json ../flatc --cpp --java --csharp --go --binary --python --js --ts --php --gen-mutable --reflect-names --no-fb-import --cpp-ptr-type flatbuffers::unique_ptr -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs ../flatc --cpp --js --ts --php --gen-mutable --reflect-names --gen-object-api --cpp-ptr-type flatbuffers::unique_ptr -o union_vector ./union_vector/union_vector.fbs ../flatc -b --schema --bfbs-comments -I include_test monster_test.fbs diff --git a/tests/monster_test_ps.fbs b/tests/monster_test_ps.fbs new file mode 100755 index 000000000..e587c5b09 --- /dev/null +++ b/tests/monster_test_ps.fbs @@ -0,0 +1,10 @@ +// similar schema, except to be parsed with --prefix-size + +include "monster_test.fbs"; + +namespace MyGame.Example; + +root_type Monster; + +file_identifier "MONS"; +file_extension "mops"; diff --git a/tests/monsterdata_test.mops b/tests/monsterdata_test.mops new file mode 100644 index 0000000000000000000000000000000000000000..b60881ad9dd1218910ab593b6a956cd59c0f6c46 GIT binary patch literal 448 zcmdnP$iNW7z`)?^?-vZD7(5tS7&w458-oUr)B$2v1_K5Y1`8m|28cnxfx(3#fguB^ z)`y{hp@Ja*A`B%%7$O*AfO0^<2$E^A2NDiI1jI1F;lKnmmkr1@0NSqr#5;iOIY68N z#2{UcCoAuQaN&~1J`gqmiWLCy5g=Xw#ElcHKb>vh&x6q)@1`HW