Implementation of JSON Streaming Parser
Fix warnings related to x86_64 tests' compilation.
This commit is contained in:
@@ -29,7 +29,7 @@ JsonEndToEndTest::~JsonEndToEndTest()
|
||||
|
||||
|
||||
void
|
||||
JsonEndToEndTest::TestParseAndWrite(char* input, char* expectedOutput)
|
||||
JsonEndToEndTest::TestParseAndWrite(const char* input, const char* expectedOutput)
|
||||
{
|
||||
BDataIO* inputData = new BMemoryIO(input, strlen(input));
|
||||
ObjectDeleter<BDataIO> inputDataDeleter(inputData);
|
||||
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
private:
|
||||
void TestUnterminated(const char* input);
|
||||
|
||||
void TestParseAndWrite(char* input,
|
||||
char* expectedOutput);
|
||||
void TestParseAndWrite(const char* input,
|
||||
const char* expectedOutput);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -301,12 +301,8 @@ JsonErrorHandlingTest::TestBadStringEscape()
|
||||
void
|
||||
JsonErrorHandlingTest::TestBadNumber()
|
||||
{
|
||||
BString expectedMessage;
|
||||
expectedMessage.SetToFormat("malformed number",
|
||||
JSON_SAMPLE_BROKEN_NUMBER);
|
||||
|
||||
TestParseWithErrorMessage(JSON_SAMPLE_BROKEN_NUMBER, 1, B_BAD_DATA,
|
||||
expectedMessage.String());
|
||||
"malformed number");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ JsonTextWriterTest::TestInteger()
|
||||
BMallocIO* outputData = new BMallocIO();
|
||||
ObjectDeleter<BMallocIO> outputDataDeleter(outputData);
|
||||
BJsonTextWriter writer(outputData);
|
||||
static char* expectedOut = JSON_SAMPLE_NUMBER_B_EXPECTED_OUT;
|
||||
static const char* expectedOut = JSON_SAMPLE_NUMBER_B_EXPECTED_OUT;
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(B_OK,
|
||||
writer.WriteInteger(JSON_SAMPLE_NUMBER_B_LITERAL));
|
||||
@@ -134,7 +134,7 @@ JsonTextWriterTest::TestDouble()
|
||||
BMallocIO* outputData = new BMallocIO();
|
||||
ObjectDeleter<BMallocIO> outputDataDeleter(outputData);
|
||||
BJsonTextWriter writer(outputData);
|
||||
static char* expectedOut = "3.142857";
|
||||
static const char* expectedOut = "3.142857";
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(B_OK,
|
||||
writer.WriteDouble(JSON_SAMPLE_NUMBER_A_LITERAL));
|
||||
@@ -157,7 +157,7 @@ JsonTextWriterTest::TestFalse()
|
||||
BMallocIO* outputData = new BMallocIO();
|
||||
ObjectDeleter<BMallocIO> outputDataDeleter(outputData);
|
||||
BJsonTextWriter writer(outputData);
|
||||
static char* expectedOut = "false";
|
||||
static const char* expectedOut = "false";
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(B_OK, writer.WriteFalse());
|
||||
writer.Complete();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user