grammar : use int64_t to avoid int overflows in int schema to grammar conversion logic (#16626)

This commit is contained in:
Olivier Chafik authored and GitHub committed 2025-10-17 08:59:31 +03:00
1 parent ceff6bb253
commit 79967ec596
2 files changed
+36 -12

No files matched your search

+24
View File
@@ -301,6 +301,30 @@ static void test_simple_grammar() {
"0123",
}
);
test_schema(
"min 1 max 900719925474091",
// Schema
R"""({
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 900719925474091
})""",
// Passing strings
{
"1",
"2",
"10",
"900719925474090",
"900719925474091",
},
// Failing strings
{
"0",
"01",
"900719925474092",
"9007199254740910",
}
);
test_schema(
"min -1 max 1",
R"""({