mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 19:51:58 +01:00
JSON bug fixes
GH #241: SF #620 Endless loop in JSON parser (added Buffer::setCapacity) GH #242: SF #619 Syntax error in JSON parser (float/double trim)
This commit is contained in:
@@ -266,6 +266,14 @@ void CoreTest::testBuffer()
|
||||
assert (b.size() == s*2);
|
||||
assert (b.capacity() == s*2);
|
||||
|
||||
b.setCapacity(s * 4);
|
||||
assert (b.size() == s*2);
|
||||
assert (b.capacity() == s*4);
|
||||
|
||||
b.setCapacity(s);
|
||||
assert (b.size() == s);
|
||||
assert (b.capacity() == s);
|
||||
|
||||
#if ENABLE_BUGCHECK_TEST
|
||||
try { int i = b[s]; fail ("must fail"); }
|
||||
catch (Exception&) { }
|
||||
|
||||
Reference in New Issue
Block a user