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:
Sumant Tambe
2018-09-24 12:03:31 -07:00
committed by Wouter van Oortmerssen
parent b1a925dfc2
commit 49fed8c4f6
12 changed files with 687 additions and 180 deletions

17
tests/test_assert.cpp Normal file
View 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); }
}