@@ -1888,7 +1888,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, typeChecksThrowExceptions) {
1888
1888
JSONTEST_ASSERT_THROWS (objVal.asBool ());
1889
1889
JSONTEST_ASSERT_THROWS (arrVal.asBool ());
1890
1890
1891
- #endif
1891
+ #endif // JSON_USE_EXCEPTION
1892
1892
}
1893
1893
1894
1894
JSONTEST_FIXTURE_LOCAL (ValueTest, offsetAccessors) {
@@ -3323,6 +3323,8 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseWithDetailError) {
3323
3323
}
3324
3324
3325
3325
JSONTEST_FIXTURE_LOCAL (CharReaderTest, parseWithStackLimit) {
3326
+ #if JSON_USE_EXCEPTION
3327
+
3326
3328
Json::CharReaderBuilder b;
3327
3329
Json::Value root;
3328
3330
char const doc[] = R"( { "property" : "value" })" ;
@@ -3342,6 +3344,8 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseWithStackLimit) {
3342
3344
JSONTEST_ASSERT_THROWS (
3343
3345
reader->parse (doc, doc + std::strlen (doc), &root, &errs));
3344
3346
}
3347
+
3348
+ #endif // JSON_USE_EXCEPTION
3345
3349
}
3346
3350
3347
3351
JSONTEST_FIXTURE_LOCAL (CharReaderTest, testOperator) {
@@ -3961,6 +3965,8 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, indexes) {
3961
3965
}
3962
3966
3963
3967
JSONTEST_FIXTURE_LOCAL (IteratorTest, constness) {
3968
+ #if JSON_USE_EXCEPTION
3969
+
3964
3970
Json::Value const v;
3965
3971
JSONTEST_ASSERT_THROWS (
3966
3972
Json::Value::iterator it (v.begin ())); // Compile, but throw.
@@ -3982,6 +3988,8 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, constness) {
3982
3988
}
3983
3989
Json::String expected = R"( " 9","10","11",)" ;
3984
3990
JSONTEST_ASSERT_STRING_EQUAL (expected, out.str ());
3991
+
3992
+ #endif // JSON_USE_EXCEPTION
3985
3993
}
3986
3994
3987
3995
struct RValueTest : JsonTest::TestCase {};
0 commit comments