Skip to content

Commit

Permalink
Uncommenting formerly commented tests so that they fail for others wh…
Browse files Browse the repository at this point in the history
…o are attempting to reproduce the bugs.
  • Loading branch information
HanClinto committed Jun 6, 2024
1 parent 8831e6c commit bd3ebb6
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tests/test-grammar-integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void test_grammar(const std::string & test_desc, const std::string & gram
fclose(string_file);
}

fprintf(stderr, " Analyze in detail by running: `./gbnf-validator test-grammar-integration.grammar.gbnf test-grammar-integration.string.txt`\n");
fprintf(stderr, "\n NOTE: Debug grammar file generated. To analyze this failure in detail, run the following command: ./gbnf-validator test-grammar-integration.grammar.gbnf test-grammar-integration.string.txt\n\n");
} else {
fprintf(stdout, "✅︎\n");
}
Expand Down Expand Up @@ -734,9 +734,9 @@ static void test_json_schema() {
R"""({})""",
// "By default, providing additional properties is valid"
// TODO: The following should pass, but currently FAILS. Additional properties should be permitted by default.
// R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
// TODO: Spaces should be permitted around enum values, but currently they fail to pass.
// R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
},
// Failing strings
{
Expand Down Expand Up @@ -769,17 +769,20 @@ static void test_json_schema() {
)),
// Passing strings
{
//R"""({"number":1600,"street_name":"Pennsylvania","street_type":"Avenue"})""",
// TODO: Following line should pass and doesn't
R"""({"number":1600,"street_name":"Pennsylvania","street_type":"Avenue"})""",
// "By default, leaving out properties is valid"
//R"""({ "street_name": "Pennsylvania" })""",
//R"""({ "number": 1600, "street_name": "Pennsylvania" })""",
// TODO: Following line should pass and doesn't
R"""({ "street_name": "Pennsylvania" })""",
// TODO: Following line should pass and doesn't
R"""({ "number": 1600, "street_name": "Pennsylvania" })""",
// "By extension, even an empty object is valid"
R"""({})""",
// "By default, providing additional properties is valid"
// TODO: The following should pass, but currently FAILS. Additional properties should be permitted by default.
//R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
// TODO: Spaces should be permitted around enum values, but currently they fail to pass.
// R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
},
// Failing strings
{
Expand Down

0 comments on commit bd3ebb6

Please sign in to comment.