mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-10 02:07:35 +02:00
Fixed a test that causes a crash when exceptions are disabled.
While I was at it, corrected whitespace too.
This commit is contained in:
parent
68db655347
commit
5d32295a6e
@ -1463,6 +1463,7 @@ ValueTest::checkIsEqual( const Json::Value &x, const Json::Value &y )
|
||||
|
||||
JSONTEST_FIXTURE( ValueTest, checkInteger )
|
||||
{
|
||||
#if JSON_USE_EXCEPTION
|
||||
try {
|
||||
Json::Value x = 1;
|
||||
x["key"]; // SIGABRT?
|
||||
@ -1471,6 +1472,7 @@ JSONTEST_FIXTURE( ValueTest, checkInteger )
|
||||
} catch (std::runtime_error const&) {
|
||||
JSONTEST_ASSERT( 1 ); // good
|
||||
}
|
||||
#endif // JSON_USE_EXCEPTION
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user