mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 19:24:23 +01:00
Fix Document.UserBuffer test
This commit is contained in:
parent
98b66e3c5a
commit
0edd743c83
@ -241,7 +241,7 @@ TEST(Document, UserBuffer) {
|
||||
char parseBuffer[1024];
|
||||
MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer));
|
||||
MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer));
|
||||
DocumentType doc(&valueAllocator, sizeof(parseBuffer), &parseAllocator);
|
||||
DocumentType doc(&valueAllocator, sizeof(parseBuffer) / 2, &parseAllocator);
|
||||
doc.Parse(" { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ");
|
||||
EXPECT_FALSE(doc.HasParseError());
|
||||
EXPECT_LE(valueAllocator.Size(), sizeof(valueBuffer));
|
||||
|
Loading…
x
Reference in New Issue
Block a user