From fadaef84dd44f73a9fe070df308dc94f63e8720a Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 20 Apr 2012 15:13:19 +0200 Subject: [PATCH] Jasmine: Convert tests of parser's "comment" rule --- spec/parser.spec.js | 6 ++++++ test/parser-test.js | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/parser.spec.js b/spec/parser.spec.js index 44703f6..1b0ff9e 100644 --- a/spec/parser.spec.js +++ b/spec/parser.spec.js @@ -68,6 +68,12 @@ describe("PEG.js grammar parser", function() { }); }); + // Canonical comment is "/* comment */". + it("parses comment", function() { + expect('start =// comment\n"abcd"' ).toParseAs(trivialGrammar); + expect('start =/* comment */"abcd"').toParseAs(trivialGrammar); + }); + /* Canonical singleLineComment is "// comment". */ it("parses singleLineComment", function() { expect('start =//\n"abcd"' ).toParseAs(trivialGrammar); diff --git a/test/parser-test.js b/test/parser-test.js index fd25e10..8664669 100644 --- a/test/parser-test.js +++ b/test/parser-test.js @@ -536,10 +536,4 @@ test("parses __", function() { /* Trivial character class rules are not tested. */ -// Canonical comment is "\/* comment *\/". -test("parses comment", function() { - parserParses('start =// comment\n"abcd"', simpleGrammar); - parserParses('start =/* comment */"abcd"', simpleGrammar); -}); - })();