Jasmine: Convert tests of parser's "singleLineComment" rule

redux
David Majda 13 years ago
parent dac3b0d8d9
commit b5ccaed491

@ -68,6 +68,13 @@ describe("PEG.js grammar parser", function() {
});
});
/* Canonical singleLineComment is "// comment". */
it("parses singleLineComment", function() {
expect('start =//\n"abcd"' ).toParseAs(trivialGrammar);
expect('start =//a\n"abcd"' ).toParseAs(trivialGrammar);
expect('start =//aaa\n"abcd"').toParseAs(trivialGrammar);
});
// Canonical multiLineComment is "/* comment */".
it("parses multiLineComment", function() {
expect('start =/**/"abcd"' ).toParseAs(trivialGrammar);

@ -541,12 +541,5 @@ test("parses comment", function() {
parserParses('start =// comment\n"abcd"', simpleGrammar);
parserParses('start =/* comment */"abcd"', simpleGrammar);
});
/* Canonical singleLineComment is "// comment". */
test("parses singleLineComment", function() {
parserParses('start =//\n"abcd"', simpleGrammar);
parserParses('start =//a\n"abcd"', simpleGrammar);
parserParses('start =//aaa\n"abcd"', simpleGrammar);
parserParses('start = "abcd"//', simpleGrammar);
});
})();

Loading…
Cancel
Save