mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
Add FlatBufferBuilder move semantics tests to the main test suite (#4902)
* Add FlatBufferBuilder move semantics tests to main Do not eagerly delete/reset allocators in release and release_raw functions Update android, vs2010 build files New tests for various types of FlatBufferBuilders and move semantics * Improve test failure output with function names
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
b1a925dfc2
commit
49fed8c4f6
17
tests/test_assert.cpp
Normal file
17
tests/test_assert.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "test_assert.h"
|
||||
|
||||
int testing_fails = 0;
|
||||
|
||||
void TestFail(const char *expval, const char *val, const char *exp,
|
||||
const char *file, int line, const char *func) {
|
||||
TEST_OUTPUT_LINE("VALUE: \"%s\"", expval);
|
||||
TEST_OUTPUT_LINE("EXPECTED: \"%s\"", val);
|
||||
TEST_OUTPUT_LINE("TEST FAILED: %s:%d, %s in %s", file, line, exp, func? func : "");
|
||||
testing_fails++;
|
||||
}
|
||||
|
||||
void TestEqStr(const char *expval, const char *val, const char *exp,
|
||||
const char *file, int line) {
|
||||
if (strcmp(expval, val) != 0) { TestFail(expval, val, exp, file, line); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user