handle yajl 2.1.0 API changes

This commit is contained in:
Michael Davidsaver
2017-10-31 17:45:40 -05:00
parent e247a2c4eb
commit 51cbe538e8
5 changed files with 79 additions and 25 deletions

View File

@@ -97,12 +97,16 @@ void testparseanyjunk()
{
testThrows(std::runtime_error, std::istringstream strm("{} x"); std::cout<<pvd::parseJSON(strm) );
}
#ifndef EPICS_YAJL_VERSION
{
testThrows(std::runtime_error, std::istringstream strm("{} /* y */"); std::cout<<pvd::parseJSON(strm) );
}
{
testThrows(std::runtime_error, std::istringstream strm("{} /* y *"); std::cout<<pvd::parseJSON(strm) );
}
#else
testSkip(2, "yajl >= 2.1.0 handles trailing comments for us");
#endif
{
testThrows(std::runtime_error, std::istringstream strm("{}\n\n{}"); std::cout<<pvd::parseJSON(strm) );
}