From 72256c3368aedd1314bcee43c6a50f58f7d6deda Mon Sep 17 00:00:00 2001 From: opsocket Date: Fri, 19 Aug 2022 18:33:24 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20fix=20test=20for=20read=20only=20va?= =?UTF-8?q?lues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/read-only-values.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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