diff --git a/test/read-only-values.cpp b/test/read-only-values.cpp index 0adeb7c..225c5f4 100644 --- a/test/read-only-values.cpp +++ b/test/read-only-values.cpp @@ -16,8 +16,13 @@ static const json read_only_schema = R"({ int main() { json_validator validator(read_only_schema); - validator.validate(R"({ - "debug": true - })"); - return 0; + try { + validator.validate(R"({ + "debug": true + })"); + } catch (const std::exception&e ) { + return EXIT_SUCCESS; + } + + return EXIT_FAILURE; } \ No newline at end of file