summaryrefslogtreecommitdiff
path: root/tests/test_builder.cpp
diff options
context:
space:
mode:
authorSumant Tambe <sutambe@yahoo.com>2018-10-18 10:32:59 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2018-10-18 10:32:59 -0700
commit802639e40dcc9adc047ca8d64a493e3646d9811d (patch)
treeed3bdcf4f8b68ab9f80df5cd0ed603d61cefac32 /tests/test_builder.cpp
parentad8b1e5dbdd48a86b7e1824c98af49b665cb5860 (diff)
downloadflatbuffers-802639e40dcc9adc047ca8d64a493e3646d9811d.tar.gz
flatbuffers-802639e40dcc9adc047ca8d64a493e3646d9811d.tar.bz2
flatbuffers-802639e40dcc9adc047ca8d64a493e3646d9811d.zip
Efficient Conversion of a FlatBufferBuilder to a MessageBuilder (#4980)
* Efficient conversion of FlatBufferBuilder to grpc::MessageBuilder * Added a variety of tests to validate correctness of the MessageBuilder move operations. Disable MessageBuilder half-n-half tests on MacOS. * Fix failing Android build * Generalized the MessageBuilder move constructor to accept a deallocator
Diffstat (limited to 'tests/test_builder.cpp')
-rw-r--r--tests/test_builder.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_builder.cpp b/tests/test_builder.cpp
index 2c1e823c..8c070c11 100644
--- a/tests/test_builder.cpp
+++ b/tests/test_builder.cpp
@@ -129,7 +129,9 @@ bool release_n_verify(flatbuffers::FlatBufferBuilder &fbb, const std::string &ex
}
void FlatBufferBuilderTest() {
- BuilderTests<flatbuffers::FlatBufferBuilder>::all_tests();
+ using flatbuffers::FlatBufferBuilder;
+
+ BuilderTests<FlatBufferBuilder>::all_tests();
BuilderTests<TestHeapBuilder>::all_tests();
BuilderTests<GrpcLikeMessageBuilder>::all_tests();
@@ -140,7 +142,7 @@ void FlatBufferBuilderTest() {
REUSABLE_AFTER_RELEASE_RAW_AND_MOVE_ASSIGN
};
- BuilderReuseTests<flatbuffers::FlatBufferBuilder>::run_tests(TestSelector(tests, tests+4));
- BuilderReuseTests<TestHeapBuilder>::run_tests(TestSelector(tests, tests+4));
- BuilderReuseTests<GrpcLikeMessageBuilder>::run_tests(TestSelector(tests, tests+4));
+ BuilderReuseTests<FlatBufferBuilder, FlatBufferBuilder>::run_tests(TestSelector(tests, tests+4));
+ BuilderReuseTests<TestHeapBuilder, TestHeapBuilder>::run_tests(TestSelector(tests, tests+4));
+ BuilderReuseTests<GrpcLikeMessageBuilder, GrpcLikeMessageBuilder>::run_tests(TestSelector(tests, tests+4));
}