summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/parser/syntax-error-illegal-character.js
blob: b633b6406e0b4e509f500d41aaf3231551ab4211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
load(libdir + "syntax.js");

var JSMSG_ILLEGAL_CHARACTER = "illegal character";

var postfixes = [
  "@",
];

function check_syntax_error(e, code, name) {
  assertEq(e instanceof SyntaxError, true, name + ": " + code);
  assertEq(e.message, JSMSG_ILLEGAL_CHARACTER, name + ": " + code);
}

test_syntax(postfixes, check_syntax_error, false);