From ac2a8f89308cad9e8816785164fb37fea982e830 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Sat, 8 Jun 2024 20:39:42 +0100 Subject: [PATCH] Update test-grammar-integration.cpp --- tests/test-grammar-integration.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/test-grammar-integration.cpp b/tests/test-grammar-integration.cpp index da5c5f98d..0fe6abef1 100644 --- a/tests/test-grammar-integration.cpp +++ b/tests/test-grammar-integration.cpp @@ -148,6 +148,33 @@ static void test_simple_grammar() { "-10000", "-100000000000000000000000000000000", "100000000000000000000000000000000", + "00", + "01", + "-0", + } + ); + test_schema( + "simple min 456", + R"""({ + "type": "integer", + "minimum": 456 + })""", + // Passing strings + { + "456", + "4560", + "457", + "460", + "500", + }, + // Failing strings + { + "455", + "356", + "50", + "050", + "-1", + "-456", } ); test_schema(