json: proper paren fix
This commit is contained in:
parent
a381deb1b6
commit
f8db47814b
2 changed files with 3 additions and 3 deletions
|
@ -216,6 +216,7 @@ static void _generate_min_max_int(int min_value, int max_value, std::stringstrea
|
||||||
out << "[" << from[i] << "] ";
|
out << "[" << from[i] << "] ";
|
||||||
out << "(";
|
out << "(";
|
||||||
uniform_range(from_sub, sub_nines);
|
uniform_range(from_sub, sub_nines);
|
||||||
|
out << ")";
|
||||||
if (from[i] < to[i] - 1) {
|
if (from[i] < to[i] - 1) {
|
||||||
out << " | ";
|
out << " | ";
|
||||||
if (to_sub == sub_nines) {
|
if (to_sub == sub_nines) {
|
||||||
|
@ -227,7 +228,6 @@ static void _generate_min_max_int(int min_value, int max_value, std::stringstrea
|
||||||
out << " ";
|
out << " ";
|
||||||
more_digits(sub_len, sub_len);
|
more_digits(sub_len, sub_len);
|
||||||
}
|
}
|
||||||
out << ")";
|
|
||||||
}
|
}
|
||||||
if (!to_reached) {
|
if (!to_reached) {
|
||||||
out << " | ";
|
out << " | ";
|
||||||
|
|
|
@ -233,7 +233,7 @@ static void test_all(const std::string & lang, std::function<void(const TestCase
|
||||||
"maximum": 300
|
"maximum": 300
|
||||||
})""",
|
})""",
|
||||||
R"""(
|
R"""(
|
||||||
root ::= ([1] ([5-9] | [2-9] [0-9]) | [1-2] [0-9]{2} | [3] "00") space
|
root ::= ([1] ([5-9]) | [2-9] [0-9] | [1-2] [0-9]{2} | [3] "00") space
|
||||||
space ::= " "?
|
space ::= " "?
|
||||||
)"""
|
)"""
|
||||||
});
|
});
|
||||||
|
@ -608,7 +608,7 @@ static void test_all(const std::string & lang, std::function<void(const TestCase
|
||||||
"maxItems": 5
|
"maxItems": 5
|
||||||
})""",
|
})""",
|
||||||
R"""(
|
R"""(
|
||||||
item ::= ([1] ([2] ([2-9] | [3-9] [0-9])) | [2] "0" [0-7]) space
|
item ::= ([1] ([2] ([2-9]) | [3-9] [0-9]) | [2] "0" [0-7]) space
|
||||||
root ::= "[" space item ("," space item){2,4} "]" space
|
root ::= "[" space item ("," space item){2,4} "]" space
|
||||||
space ::= " "?
|
space ::= " "?
|
||||||
)"""
|
)"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue