Add fuzzer test for scalar numbers in json. (#4996)

* Add fuzzer test for scalar numbers in json. Grammar-based regex used to check correctness.

* Fix conversation
This commit is contained in:
Vladimir Glavnyy
2018-10-23 05:44:18 +07:00
committed by Wouter van Oortmerssen
parent efbb11e093
commit 55b30827f2
12 changed files with 619 additions and 80 deletions

View File

@@ -17,9 +17,17 @@
extern int testing_fails;
// Prepare test engine (MSVC assertion setup, etc)
void InitTestEngine();
// Listener of TestFail, like 'gtest::OnTestPartResult' event handler.
// Called in TestFail after a failed assertion.
typedef bool (*TestFailEventListener)(const char *expval, const char *val,
const char *exp, const char *file, int line,
const char *func);
// Prepare test engine (MSVC assertion setup, etc).
// listener - this function will be notified on each TestFail call.
void InitTestEngine(TestFailEventListener listener = nullptr);
// Write captured state to a log and terminate test run.
void TestFail(const char *expval, const char *val, const char *exp,
const char *file, int line, const char *func = 0);