You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then the grammar tests fail because the nlohmann/json library fails to parse the generated json:
$ bazel test //domain_tests:in_grammar_domain_test
...
Executing tests from //domain_tests:in_grammar_domain_test
-----------------------------------------------------------------------------
Running main() from gmock_main.cc
[==========] Running 6 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 5 tests from InJsonGrammar
[ RUN ] InJsonGrammar.InitGeneratesDifferentValidJson
domain_tests/in_grammar_domain_test.cc:41: Failure
Value of: parsed_json.is_discarded()
Actual: true
Expected: false
"{\"\\\\\"\":[80.0E3,false]}"
...
That's because backslashes are escaped when they shouldn't be. E.g. "\"" (quote, escaped quote, quote) becomes "\\"" (quote, escaped backslash, quote, quote), which is not correct json.
The linked PR fixes the issue.
The text was updated successfully, but these errors were encountered:
When I change fuzztest/grammars/JSON.g4 to support some escape sequences
then the grammar tests fail because the nlohmann/json library fails to parse the generated json:
That's because backslashes are escaped when they shouldn't be. E.g.
"\""
(quote, escaped quote, quote) becomes"\\""
(quote, escaped backslash, quote, quote), which is not correct json.The linked PR fixes the issue.
The text was updated successfully, but these errors were encountered: