mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 21:50:47 +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:
@@ -1647,6 +1647,14 @@ void JSONTest::testUnicode()
|
||||
}
|
||||
|
||||
|
||||
void JSONTest::testSmallBuffer()
|
||||
{
|
||||
Poco::JSON::Parser parser(new Poco::JSON::ParseHandler(), 4);
|
||||
std::string jsonStr = "{ \"x\" : \"123456789012345678901234567890123456789012345678901234567890\" }";
|
||||
parser.parse(jsonStr);
|
||||
}
|
||||
|
||||
|
||||
std::string JSONTest::getTestFilesPath(const std::string& type)
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
@@ -1717,6 +1725,7 @@ CppUnit::Test* JSONTest::suite()
|
||||
CppUnit_addTest(pSuite, JSONTest, testInvalidUnicodeJanssonFiles);
|
||||
CppUnit_addTest(pSuite, JSONTest, testTemplate);
|
||||
CppUnit_addTest(pSuite, JSONTest, testUnicode);
|
||||
CppUnit_addTest(pSuite, JSONTest, testSmallBuffer);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user