Skip to content

Commit acd3c46

Browse files
committed
Uncommenting formerly commented tests so that they fail for others who are attempting to reproduce the bugs.
1 parent 74985de commit acd3c46

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

tests/test-grammar-integration.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static void test_grammar(const std::string & test_desc, const std::string & gram
102102
fclose(string_file);
103103
}
104104

105-
fprintf(stderr, " Analyze in detail by running: `./gbnf-validator test-grammar-integration.grammar.gbnf test-grammar-integration.string.txt`\n");
105+
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");
106106
} else {
107107
fprintf(stdout, "✅︎\n");
108108
}
@@ -837,9 +837,9 @@ static void test_json_schema() {
837837
R"""({})""",
838838
// "By default, providing additional properties is valid"
839839
// TODO: The following should pass, but currently FAILS. Additional properties should be permitted by default.
840-
// R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
840+
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
841841
// TODO: Spaces should be permitted around enum values, but currently they fail to pass.
842-
// R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
842+
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
843843
},
844844
// Failing strings
845845
{
@@ -872,17 +872,20 @@ static void test_json_schema() {
872872
)),
873873
// Passing strings
874874
{
875-
//R"""({"number":1600,"street_name":"Pennsylvania","street_type":"Avenue"})""",
875+
// TODO: Following line should pass and doesn't
876+
R"""({"number":1600,"street_name":"Pennsylvania","street_type":"Avenue"})""",
876877
// "By default, leaving out properties is valid"
877-
//R"""({ "street_name": "Pennsylvania" })""",
878-
//R"""({ "number": 1600, "street_name": "Pennsylvania" })""",
878+
// TODO: Following line should pass and doesn't
879+
R"""({ "street_name": "Pennsylvania" })""",
880+
// TODO: Following line should pass and doesn't
881+
R"""({ "number": 1600, "street_name": "Pennsylvania" })""",
879882
// "By extension, even an empty object is valid"
880883
R"""({})""",
881884
// "By default, providing additional properties is valid"
882885
// TODO: The following should pass, but currently FAILS. Additional properties should be permitted by default.
883-
//R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
886+
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type":"Avenue", "direction":"NW"})""",
884887
// TODO: Spaces should be permitted around enum values, but currently they fail to pass.
885-
// R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
888+
R"""({ "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" })""",
886889
},
887890
// Failing strings
888891
{

0 commit comments

Comments
 (0)