fix parser tests

update exception messages
This commit is contained in:
alexlamsl
2017-02-28 03:58:01 +08:00
parent a0eaff750d
commit a942dc07c4
12 changed files with 30 additions and 31 deletions

View File

@@ -107,9 +107,9 @@ describe("Object", function() {
var fail = function(data) {
return function (e) {
return e instanceof Uglify.JS_Parse_Error && (
e.message === "SyntaxError: Unexpected token: operator (" + data.operator + ")" ||
(e.message === "SyntaxError: Unterminated regular expression" && data.operator[0] === "/") ||
(e.message === "SyntaxError: Unexpected token: punc (()" && data.operator === "*")
e.message === "Unexpected token: operator (" + data.operator + ")" ||
(e.message === "Unterminated regular expression" && data.operator[0] === "/") ||
(e.message === "Unexpected token: punc (()" && data.operator === "*")
);
};
};