From 9bf86b89a64289bc27bf554dc61ee5f70411c25c Mon Sep 17 00:00:00 2001 From: David Majda Date: Sat, 22 May 2010 18:58:41 +0200 Subject: [PATCH] Fix stupid mistakes in metagrammar-test.js The mistakes weren't caught because the first one introduces a syntax error, causing the whole test suite not to load. Unfortunately, QUnit didn't complain so I missed this. The real commit these changes belong to is 33a1a7c1e996dcf0d1c423b6db9740ff1ecea746. --- test/metagrammar-test.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/metagrammar-test.js b/test/metagrammar-test.js index 241cd8b..2b2dbf7 100644 --- a/test/metagrammar-test.js +++ b/test/metagrammar-test.js @@ -345,13 +345,13 @@ test("parses class", function() { classGrammar(false, [["a", "d"], ["e", "h"], ["i", "l"]], "[a-de-hi-l]") ); - grammarParserParses("start: [a-d]\n", classGrammar(false, [["a", "d"]], "[a-d"])); + grammarParserParses("start: [a-d]\n", classGrammar(false, [["a", "d"]], "[a-d]")); }); /* Canonical classCharacterRange is "a-d". */ test("parses classCharacterRange", function() { grammarParserParses("start: [a-d]", classGrammar(false, [["a", "d"]], "[a-d]")); - grammarParserParses("start: [a-a]", classGrammar(false, [["a", "a"]], "[a-d]")); + grammarParserParses("start: [a-a]", classGrammar(false, [["a", "a"]], "[a-a]")); grammarParserDoesNotParse("start: [b-a]"); }); @@ -362,18 +362,18 @@ test("parses classCharacter", function() { /* Canonical bracketDelimitedCharacter is "a". */ test("parses bracketDelimitedCharacter", function() { - grammarParserParses("start: [a]", classGrammar(false, ["a"])); - grammarParserParses("start: [\\n]", classGrammar(false, ["\n"])); - grammarParserParses("start: [\\0]", classGrammar(false, ["\0"])); - grammarParserParses("start: [\\x00]", classGrammar(false, ["\0"])); - grammarParserParses("start: [\\u0120]", classGrammar(false, ["\u0120"])); - grammarParserParses("start: [\\\n]", classGrammar(false, ["\n"])); + grammarParserParses("start: [a]", classGrammar(false, ["a"], "[a]")); + grammarParserParses("start: [\\n]", classGrammar(false, ["\n"], "[\\n]")); + grammarParserParses("start: [\\0]", classGrammar(false, ["\0"], "[\\0]")); + grammarParserParses("start: [\\x00]", classGrammar(false, ["\0"], "[\\0]")); + grammarParserParses("start: [\\u0120]", classGrammar(false, ["\u0120"], "[\u0120]")); + grammarParserParses("start: [\\\n]", classGrammar(false, ["\n"], "[\\n]")); }); /* Canonical simpleBracketDelimiedCharacter is "a". */ test("parses simpleBracketDelimitedCharacter", function() { - grammarParserParses("start: [a]", classGrammar(false, ["a"])); - grammarParserParses("start: [[]", classGrammar(false, ["["])); + grammarParserParses("start: [a]", classGrammar(false, ["a"], "[a]")); + grammarParserParses("start: [[]", classGrammar(false, ["["], "[[]")); grammarParserDoesNotParse("start: []]"); grammarParserDoesNotParse("start: [\\]"); grammarParserDoesNotParse("start: [\n]");