json: fix min 0

This commit is contained in:
ochafik 2024-04-30 23:35:33 +01:00
parent 057bbdc1f3
commit d69ccb06a4
2 changed files with 2 additions and 1 deletions

View file

@ -195,6 +195,7 @@ static void _generate_min_max_int(int min_value, int max_value, std::stringstrea
if (min_value == 0) {
if (top_level) {
out << "[1-9] ";
out << "[0] | [1-9] ";
more_digits(0, less_decimals);
} else {
more_digits(1, decimals_left);

View file

@ -88,7 +88,7 @@ static void test_all(const std::string & lang, std::function<void(const TestCase
"minimum": 0
})""",
R"""(
root ::= ([1-9] [0-9]{0,15}) space
root ::= ([0] | [1-9] [0-9]{0,15}) space
space ::= " "?
)"""
});