8147012: Fix includes in internalVMTests.cpp

Reviewed-by: stefank, mgerdin
This commit is contained in:
Erik Helin 2016-01-19 11:00:29 +01:00
parent 4651887649
commit f646b9fac7
18 changed files with 104 additions and 101 deletions

View file

@ -687,6 +687,24 @@ void JSON::error(JSON_ERROR e, const char* format, ...) {
}
#ifndef PRODUCT
class JSONTest : public JSON {
public:
static void test();
private:
JSONTest(const char* text);
static void test(const char* json, bool valid);
void log(uint level, const char* format, ...) ATTRIBUTE_PRINTF(3, 4);
bool callback(JSON_TYPE t, JSON_VAL* v, uint level);
JSON_TYPE prev;
};
void JSON_test() {
JSONTest::test();
}
void JSONTest::test(const char* text, bool should_pass) {
JSONTest json(text);
if (should_pass) {
@ -707,7 +725,7 @@ JSONTest::JSONTest(const char* text) : JSON(text, !VerboseInternalVMTests, tty)
parse();
}
bool JSONTest::test() {
void JSONTest::test() {
JSONTest::test("{}", true);
JSONTest::test("[]", true);
JSONTest::test(" { } ", true);
@ -842,8 +860,6 @@ bool JSONTest::test() {
" blocking_compile: true" "\n"
" }," "\n"
"]" "\n", true);
return true;
}
void JSONTest::log(uint indent, const char* format, ...) {