Merge branch 'master' into harmony-2.8.0
This commit is contained in:
32
test/mocha/accessorTokens-1492.js
Normal file
32
test/mocha/accessorTokens-1492.js
Normal file
@@ -0,0 +1,32 @@
|
||||
var UglifyJS = require('../../');
|
||||
var assert = require("assert");
|
||||
|
||||
describe("Accessor tokens", function() {
|
||||
it("Should fill the token information for accessors (issue #1492)", function() {
|
||||
// location 0 1 2 3 4
|
||||
// 01234567890123456789012345678901234567890123456789
|
||||
var ast = UglifyJS.parse("var obj = { get latest() { return undefined; } }");
|
||||
|
||||
// test all AST_ObjectProperty tokens are set as expected
|
||||
var checkedAST_ObjectProperty = false;
|
||||
var checkWalker = new UglifyJS.TreeWalker(function(node, descend) {
|
||||
if (node instanceof UglifyJS.AST_ObjectProperty) {
|
||||
checkedAST_ObjectProperty = true;
|
||||
|
||||
assert.equal(node.start.pos, 12);
|
||||
assert.equal(node.end.endpos, 46);
|
||||
|
||||
assert(node.key instanceof UglifyJS.AST_SymbolRef);
|
||||
assert.equal(node.key.start.pos, 16);
|
||||
assert.equal(node.key.end.endpos, 22);
|
||||
|
||||
assert(node.value instanceof UglifyJS.AST_Accessor);
|
||||
assert.equal(node.value.start.pos, 22);
|
||||
assert.equal(node.value.end.endpos, 46);
|
||||
|
||||
}
|
||||
});
|
||||
ast.walk(checkWalker);
|
||||
assert(checkedAST_ObjectProperty, "AST_ObjectProperty not found");
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,6 @@
|
||||
var assert = require("assert");
|
||||
var exec = require("child_process").exec;
|
||||
var readFileSync = require("fs").readFileSync;
|
||||
|
||||
describe("bin/uglifyjs", function () {
|
||||
var uglifyjscmd = '"' + process.argv[0] + '" bin/uglifyjs';
|
||||
@@ -100,4 +101,141 @@ describe("bin/uglifyjs", function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should work with --define (simple)", function (done) {
|
||||
var command = uglifyjscmd + ' test/input/global_defs/simple.js --define D=5 -c';
|
||||
|
||||
exec(command, function (err, stdout) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, "console.log(5);\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should work with --define (nested)", function (done) {
|
||||
var command = uglifyjscmd + ' test/input/global_defs/nested.js --define C.D=5,C.V=3 -c';
|
||||
|
||||
exec(command, function (err, stdout) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, "console.log(3,5);\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should work with --define (AST_Node)", function (done) {
|
||||
var command = uglifyjscmd + ' test/input/global_defs/simple.js --define console.log=stdout.println -c';
|
||||
|
||||
exec(command, function (err, stdout) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, "stdout.println(D);\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should work with `--beautify`", function (done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-1482/input.js -b';
|
||||
|
||||
exec(command, function (err, stdout) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, readFileSync("test/input/issue-1482/default.js", "utf8"));
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should work with `--beautify bracketize`", function (done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-1482/input.js -b bracketize';
|
||||
|
||||
exec(command, function (err, stdout) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, readFileSync("test/input/issue-1482/bracketize.js", "utf8"));
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should process inline source map", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-520/input.js -cm toplevel --in-source-map inline --source-map-inline';
|
||||
|
||||
exec(command, function (err, stdout) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, readFileSync("test/input/issue-520/output.js", "utf8"));
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should warn for missing inline source map", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-1323/sample.js --in-source-map inline';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
if (err) throw err;
|
||||
|
||||
assert.strictEqual(stdout, "var bar=function(){function foo(bar){return bar}return foo}();\n");
|
||||
assert.strictEqual(stderr, "WARN: inline source map not found\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should fail with multiple input and inline source map", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-520/input.js test/input/issue-520/output.js --in-source-map inline --source-map-inline';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
assert.ok(err);
|
||||
assert.strictEqual(stderr, "ERROR: Inline source map only works with singular input\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should fail with acorn and inline source map", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-520/input.js --in-source-map inline --source-map-inline --acorn';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
assert.ok(err);
|
||||
assert.strictEqual(stderr, "ERROR: Inline source map only works with built-in parser\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should fail with SpiderMonkey and inline source map", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/issue-520/input.js --in-source-map inline --source-map-inline --spidermonkey';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
assert.ok(err);
|
||||
assert.strictEqual(stderr, "ERROR: Inline source map only works with built-in parser\n");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should fail with invalid syntax", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/invalid/simple.js';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
assert.ok(err);
|
||||
var lines = stderr.split(/\n/);
|
||||
assert.strictEqual(lines[0], "Parse error at test/input/invalid/simple.js:1,12");
|
||||
assert.strictEqual(lines[1], "function f(a{}");
|
||||
assert.strictEqual(lines[2], " ^");
|
||||
assert.strictEqual(lines[3], "SyntaxError: Unexpected token punc «{», expected punc «,»");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should fail with correct marking of tabs", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/invalid/tab.js';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
assert.ok(err);
|
||||
var lines = stderr.split(/\n/);
|
||||
assert.strictEqual(lines[0], "Parse error at test/input/invalid/tab.js:1,12");
|
||||
assert.strictEqual(lines[1], "\t\tfoo(\txyz, 0abc);");
|
||||
assert.strictEqual(lines[2], "\t\t \t ^");
|
||||
assert.strictEqual(lines[3], "SyntaxError: Invalid syntax: 0abc");
|
||||
done();
|
||||
});
|
||||
});
|
||||
it("Should fail with correct marking at start of line", function(done) {
|
||||
var command = uglifyjscmd + ' test/input/invalid/eof.js';
|
||||
|
||||
exec(command, function (err, stdout, stderr) {
|
||||
assert.ok(err);
|
||||
var lines = stderr.split(/\n/);
|
||||
assert.strictEqual(lines[0], "Parse error at test/input/invalid/eof.js:2,0");
|
||||
assert.strictEqual(lines[1], "foo, bar(");
|
||||
assert.strictEqual(lines[2], " ^");
|
||||
assert.strictEqual(lines[3], "SyntaxError: Unexpected token: eof (undefined)");
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ describe("Comment", function() {
|
||||
|
||||
var fail = function(e) {
|
||||
return e instanceof uglify.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Unexpected token: operator (>)" &&
|
||||
e.message === "Unexpected token: operator (>)" &&
|
||||
e.line === 2 &&
|
||||
e.col === 0;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ describe("Comment", function() {
|
||||
|
||||
var fail = function(e) {
|
||||
return e instanceof uglify.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Unexpected token: operator (>)" &&
|
||||
e.message === "Unexpected token: operator (>)" &&
|
||||
e.line === 5 &&
|
||||
e.col === 0;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ describe("comment before constant", function() {
|
||||
it("Should test comment before constant is retained and output after mangle.", function() {
|
||||
var result = Uglify.minify(js, {
|
||||
fromString: true,
|
||||
compress: { collapse_vars: false },
|
||||
compress: { collapse_vars: false, reduce_vars: false },
|
||||
mangle: {},
|
||||
output: { comments: true },
|
||||
});
|
||||
@@ -17,9 +17,9 @@ describe("comment before constant", function() {
|
||||
it("Should test code works when comments disabled.", function() {
|
||||
var result = Uglify.minify(js, {
|
||||
fromString: true,
|
||||
compress: { collapse_vars: false },
|
||||
compress: { collapse_vars: false, reduce_vars: false },
|
||||
mangle: {},
|
||||
output: {},
|
||||
output: { comments: false },
|
||||
});
|
||||
assert.strictEqual(result.code, 'function f(){var n=!1;return n}');
|
||||
});
|
||||
|
||||
@@ -178,7 +178,7 @@ describe("Directives", function() {
|
||||
throw new Error("Expected parser to fail");
|
||||
} catch (e) {
|
||||
assert.strictEqual(e instanceof uglify.JS_Parse_Error, true);
|
||||
assert.strictEqual(e.message, "SyntaxError: Unexpected token: punc (])");
|
||||
assert.strictEqual(e.message, "Unexpected token: punc (])");
|
||||
}
|
||||
|
||||
test_directive(tokenizer, tests[i]);
|
||||
|
||||
89
test/mocha/getter-setter.js
Normal file
89
test/mocha/getter-setter.js
Normal file
@@ -0,0 +1,89 @@
|
||||
var UglifyJS = require('../../');
|
||||
var assert = require("assert");
|
||||
|
||||
describe("Getters and setters", function() {
|
||||
it("Should not accept operator symbols as getter/setter name", function() {
|
||||
var illegalOperators = [
|
||||
"++",
|
||||
"--",
|
||||
"+",
|
||||
"-",
|
||||
"!",
|
||||
"~",
|
||||
"&",
|
||||
"|",
|
||||
"^",
|
||||
"*",
|
||||
"/",
|
||||
"%",
|
||||
">>",
|
||||
"<<",
|
||||
">>>",
|
||||
"<",
|
||||
">",
|
||||
"<=",
|
||||
">=",
|
||||
"==",
|
||||
"===",
|
||||
"!=",
|
||||
"!==",
|
||||
"?",
|
||||
"=",
|
||||
"+=",
|
||||
"-=",
|
||||
"/=",
|
||||
"*=",
|
||||
"%=",
|
||||
">>=",
|
||||
"<<=",
|
||||
">>>=",
|
||||
"|=",
|
||||
"^=",
|
||||
"&=",
|
||||
"&&",
|
||||
"||"
|
||||
];
|
||||
var generator = function() {
|
||||
var results = [];
|
||||
|
||||
for (var i in illegalOperators) {
|
||||
results.push({
|
||||
code: "var obj = { get " + illegalOperators[i] + "() { return test; }};",
|
||||
operator: illegalOperators[i],
|
||||
method: "get"
|
||||
});
|
||||
results.push({
|
||||
code: "var obj = { set " + illegalOperators[i] + "(value) { test = value}};",
|
||||
operator: illegalOperators[i],
|
||||
method: "set"
|
||||
});
|
||||
}
|
||||
|
||||
return results;
|
||||
};
|
||||
|
||||
var testCase = function(data) {
|
||||
return function() {
|
||||
UglifyJS.parse(data.code);
|
||||
};
|
||||
};
|
||||
|
||||
var fail = function(data) {
|
||||
return function (e) {
|
||||
return e instanceof UglifyJS.JS_Parse_Error &&
|
||||
e.message === "Invalid getter/setter name: " + data.operator;
|
||||
};
|
||||
};
|
||||
|
||||
var errorMessage = function(data) {
|
||||
return "Expected but didn't get a syntax error while parsing following line:\n" + data.code;
|
||||
};
|
||||
|
||||
var tests = generator();
|
||||
for (var i = 0; i < tests.length; i++) {
|
||||
var test = tests[i];
|
||||
assert.throws(testCase(test), fail(test), errorMessage(test));
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -50,7 +50,7 @@ describe("line-endings", function() {
|
||||
}
|
||||
var fail = function(e) {
|
||||
return e instanceof Uglify.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Unexpected line terminator";
|
||||
e.message === "Unexpected line terminator";
|
||||
}
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
assert.throws(test(inputs[i]), fail);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var Uglify = require('../../');
|
||||
var assert = require("assert");
|
||||
var readFileSync = require("fs").readFileSync;
|
||||
|
||||
describe("minify", function() {
|
||||
it("Should test basic sanity of minify with default options", function() {
|
||||
@@ -75,6 +76,51 @@ describe("minify", function() {
|
||||
assert.equal(map.sourcesContent[0],
|
||||
'let foo = x => "foo " + x;\nconsole.log(foo("bar"));');
|
||||
});
|
||||
it("Should process inline source map", function() {
|
||||
var code = Uglify.minify("./test/input/issue-520/input.js", {
|
||||
inSourceMap: "inline",
|
||||
sourceMapInline: true
|
||||
}).code + "\n";
|
||||
assert.strictEqual(code, readFileSync("test/input/issue-520/output.js", "utf8"));
|
||||
});
|
||||
it("Should warn for missing inline source map", function() {
|
||||
var warn_function = Uglify.AST_Node.warn_function;
|
||||
var warnings = [];
|
||||
Uglify.AST_Node.warn_function = function(txt) {
|
||||
warnings.push(txt);
|
||||
};
|
||||
try {
|
||||
var result = Uglify.minify("./test/input/issue-1323/sample.js", {
|
||||
inSourceMap: "inline",
|
||||
mangle: false,
|
||||
});
|
||||
assert.strictEqual(result.code, "var bar=function(){function foo(bar){return bar}return foo}();");
|
||||
assert.strictEqual(warnings.length, 1);
|
||||
assert.strictEqual(warnings[0], "inline source map not found");
|
||||
} finally {
|
||||
Uglify.AST_Node.warn_function = warn_function;
|
||||
}
|
||||
});
|
||||
it("Should fail with multiple input and inline source map", function() {
|
||||
assert.throws(function() {
|
||||
Uglify.minify([
|
||||
"./test/input/issue-520/input.js",
|
||||
"./test/input/issue-520/output.js"
|
||||
], {
|
||||
inSourceMap: "inline",
|
||||
sourceMapInline: true
|
||||
});
|
||||
});
|
||||
});
|
||||
it("Should fail with SpiderMonkey and inline source map", function() {
|
||||
assert.throws(function() {
|
||||
Uglify.minify("./test/input/issue-520/input.js", {
|
||||
inSourceMap: "inline",
|
||||
sourceMapInline: true,
|
||||
spidermonkey: true
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("sourceMapInline", function() {
|
||||
@@ -95,4 +141,34 @@ describe("minify", function() {
|
||||
assert.strictEqual(code, "var a=function(n){return n};");
|
||||
});
|
||||
});
|
||||
|
||||
describe("#__PURE__", function() {
|
||||
it("should drop #__PURE__ hint after use", function() {
|
||||
var result = Uglify.minify('//@__PURE__ comment1 #__PURE__ comment2\n foo(), bar();', {
|
||||
fromString: true,
|
||||
output: {
|
||||
comments: "all",
|
||||
beautify: false,
|
||||
}
|
||||
});
|
||||
var code = result.code;
|
||||
assert.strictEqual(code, "// comment1 comment2\nbar();");
|
||||
});
|
||||
});
|
||||
|
||||
describe("JS_Parse_Error", function() {
|
||||
it("should throw syntax error", function() {
|
||||
assert.throws(function() {
|
||||
Uglify.minify("function f(a{}", { fromString: true });
|
||||
}, function(err) {
|
||||
assert.ok(err instanceof Error);
|
||||
assert.strictEqual(err.stack.split(/\n/)[0], "SyntaxError: Unexpected token punc «{», expected punc «,»");
|
||||
assert.strictEqual(err.filename, 0);
|
||||
assert.strictEqual(err.line, 1);
|
||||
assert.strictEqual(err.col, 12);
|
||||
return true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ describe("Number literals", function () {
|
||||
}
|
||||
var error = function(e) {
|
||||
return e instanceof uglify.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Legacy octal literals are not allowed in strict mode";
|
||||
e.message === "Legacy octal literals are not allowed in strict mode";
|
||||
}
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
assert.throws(test(inputs[i]), error, inputs[i]);
|
||||
|
||||
489
test/mocha/operator.js
Normal file
489
test/mocha/operator.js
Normal file
@@ -0,0 +1,489 @@
|
||||
var UglifyJS = require("../../");
|
||||
var assert = require("assert");
|
||||
|
||||
describe("operator", function() {
|
||||
it("Should handle mixing of ++/+/--/- correctly", function() {
|
||||
function evaluate(exp) {
|
||||
return new Function("var a=1,b=2,c=" + exp + ";return{a:a,b:b,c:c}")();
|
||||
}
|
||||
|
||||
[ "", "+", "-" ].forEach(function(p) {
|
||||
[ "++a", "--a", "a", "a--", "a++" ].forEach(function(a) {
|
||||
[ "+", "-" ].forEach(function(o) {
|
||||
[ "", "+", "-" ].forEach(function(q) {
|
||||
[ "++b", "--b", "b", "b--", "b++" ].forEach(function(b) {
|
||||
var exp = [p, a, o, q, b].join(" ");
|
||||
var orig = evaluate(exp);
|
||||
var uglify = evaluate(UglifyJS.parse(exp).print_to_string());
|
||||
assert.strictEqual(orig.a, uglify.a);
|
||||
assert.strictEqual(orig.b, uglify.b);
|
||||
assert.strictEqual(orig.c, uglify.c);
|
||||
var beautify = evaluate(UglifyJS.parse(exp).print_to_string({
|
||||
beautify: true
|
||||
}));
|
||||
assert.strictEqual(orig.a, beautify.a);
|
||||
assert.strictEqual(orig.b, beautify.b);
|
||||
assert.strictEqual(orig.c, beautify.c);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
it("Should remove extraneous spaces", function() {
|
||||
[
|
||||
[ "++a + ++b", "++a+ ++b" ],
|
||||
[ "++a + --b", "++a+--b" ],
|
||||
[ "++a + b", "++a+b" ],
|
||||
[ "++a + b--", "++a+b--" ],
|
||||
[ "++a + b++", "++a+b++" ],
|
||||
[ "++a + + ++b", "++a+ + ++b" ],
|
||||
[ "++a + + --b", "++a+ +--b" ],
|
||||
[ "++a + + b", "++a+ +b" ],
|
||||
[ "++a + + b--", "++a+ +b--" ],
|
||||
[ "++a + + b++", "++a+ +b++" ],
|
||||
[ "++a + - ++b", "++a+-++b" ],
|
||||
[ "++a + - --b", "++a+- --b" ],
|
||||
[ "++a + - b", "++a+-b" ],
|
||||
[ "++a + - b--", "++a+-b--" ],
|
||||
[ "++a + - b++", "++a+-b++" ],
|
||||
[ "++a - ++b", "++a-++b" ],
|
||||
[ "++a - --b", "++a- --b" ],
|
||||
[ "++a - b", "++a-b" ],
|
||||
[ "++a - b--", "++a-b--" ],
|
||||
[ "++a - b++", "++a-b++" ],
|
||||
[ "++a - + ++b", "++a-+ ++b" ],
|
||||
[ "++a - + --b", "++a-+--b" ],
|
||||
[ "++a - + b", "++a-+b" ],
|
||||
[ "++a - + b--", "++a-+b--" ],
|
||||
[ "++a - + b++", "++a-+b++" ],
|
||||
[ "++a - - ++b", "++a- -++b" ],
|
||||
[ "++a - - --b", "++a- - --b" ],
|
||||
[ "++a - - b", "++a- -b" ],
|
||||
[ "++a - - b--", "++a- -b--" ],
|
||||
[ "++a - - b++", "++a- -b++" ],
|
||||
[ "--a + ++b", "--a+ ++b" ],
|
||||
[ "--a + --b", "--a+--b" ],
|
||||
[ "--a + b", "--a+b" ],
|
||||
[ "--a + b--", "--a+b--" ],
|
||||
[ "--a + b++", "--a+b++" ],
|
||||
[ "--a + + ++b", "--a+ + ++b" ],
|
||||
[ "--a + + --b", "--a+ +--b" ],
|
||||
[ "--a + + b", "--a+ +b" ],
|
||||
[ "--a + + b--", "--a+ +b--" ],
|
||||
[ "--a + + b++", "--a+ +b++" ],
|
||||
[ "--a + - ++b", "--a+-++b" ],
|
||||
[ "--a + - --b", "--a+- --b" ],
|
||||
[ "--a + - b", "--a+-b" ],
|
||||
[ "--a + - b--", "--a+-b--" ],
|
||||
[ "--a + - b++", "--a+-b++" ],
|
||||
[ "--a - ++b", "--a-++b" ],
|
||||
[ "--a - --b", "--a- --b" ],
|
||||
[ "--a - b", "--a-b" ],
|
||||
[ "--a - b--", "--a-b--" ],
|
||||
[ "--a - b++", "--a-b++" ],
|
||||
[ "--a - + ++b", "--a-+ ++b" ],
|
||||
[ "--a - + --b", "--a-+--b" ],
|
||||
[ "--a - + b", "--a-+b" ],
|
||||
[ "--a - + b--", "--a-+b--" ],
|
||||
[ "--a - + b++", "--a-+b++" ],
|
||||
[ "--a - - ++b", "--a- -++b" ],
|
||||
[ "--a - - --b", "--a- - --b" ],
|
||||
[ "--a - - b", "--a- -b" ],
|
||||
[ "--a - - b--", "--a- -b--" ],
|
||||
[ "--a - - b++", "--a- -b++" ],
|
||||
[ "a + ++b", "a+ ++b" ],
|
||||
[ "a + --b", "a+--b" ],
|
||||
[ "a + b", "a+b" ],
|
||||
[ "a + b--", "a+b--" ],
|
||||
[ "a + b++", "a+b++" ],
|
||||
[ "a + + ++b", "a+ + ++b" ],
|
||||
[ "a + + --b", "a+ +--b" ],
|
||||
[ "a + + b", "a+ +b" ],
|
||||
[ "a + + b--", "a+ +b--" ],
|
||||
[ "a + + b++", "a+ +b++" ],
|
||||
[ "a + - ++b", "a+-++b" ],
|
||||
[ "a + - --b", "a+- --b" ],
|
||||
[ "a + - b", "a+-b" ],
|
||||
[ "a + - b--", "a+-b--" ],
|
||||
[ "a + - b++", "a+-b++" ],
|
||||
[ "a - ++b", "a-++b" ],
|
||||
[ "a - --b", "a- --b" ],
|
||||
[ "a - b", "a-b" ],
|
||||
[ "a - b--", "a-b--" ],
|
||||
[ "a - b++", "a-b++" ],
|
||||
[ "a - + ++b", "a-+ ++b" ],
|
||||
[ "a - + --b", "a-+--b" ],
|
||||
[ "a - + b", "a-+b" ],
|
||||
[ "a - + b--", "a-+b--" ],
|
||||
[ "a - + b++", "a-+b++" ],
|
||||
[ "a - - ++b", "a- -++b" ],
|
||||
[ "a - - --b", "a- - --b" ],
|
||||
[ "a - - b", "a- -b" ],
|
||||
[ "a - - b--", "a- -b--" ],
|
||||
[ "a - - b++", "a- -b++" ],
|
||||
[ "a-- + ++b", "a--+ ++b" ],
|
||||
[ "a-- + --b", "a--+--b" ],
|
||||
[ "a-- + b", "a--+b" ],
|
||||
[ "a-- + b--", "a--+b--" ],
|
||||
[ "a-- + b++", "a--+b++" ],
|
||||
[ "a-- + + ++b", "a--+ + ++b" ],
|
||||
[ "a-- + + --b", "a--+ +--b" ],
|
||||
[ "a-- + + b", "a--+ +b" ],
|
||||
[ "a-- + + b--", "a--+ +b--" ],
|
||||
[ "a-- + + b++", "a--+ +b++" ],
|
||||
[ "a-- + - ++b", "a--+-++b" ],
|
||||
[ "a-- + - --b", "a--+- --b" ],
|
||||
[ "a-- + - b", "a--+-b" ],
|
||||
[ "a-- + - b--", "a--+-b--" ],
|
||||
[ "a-- + - b++", "a--+-b++" ],
|
||||
[ "a-- - ++b", "a---++b" ],
|
||||
[ "a-- - --b", "a--- --b" ],
|
||||
[ "a-- - b", "a---b" ],
|
||||
[ "a-- - b--", "a---b--" ],
|
||||
[ "a-- - b++", "a---b++" ],
|
||||
[ "a-- - + ++b", "a---+ ++b" ],
|
||||
[ "a-- - + --b", "a---+--b" ],
|
||||
[ "a-- - + b", "a---+b" ],
|
||||
[ "a-- - + b--", "a---+b--" ],
|
||||
[ "a-- - + b++", "a---+b++" ],
|
||||
[ "a-- - - ++b", "a--- -++b" ],
|
||||
[ "a-- - - --b", "a--- - --b" ],
|
||||
[ "a-- - - b", "a--- -b" ],
|
||||
[ "a-- - - b--", "a--- -b--" ],
|
||||
[ "a-- - - b++", "a--- -b++" ],
|
||||
[ "a++ + ++b", "a+++ ++b" ],
|
||||
[ "a++ + --b", "a+++--b" ],
|
||||
[ "a++ + b", "a+++b" ],
|
||||
[ "a++ + b--", "a+++b--" ],
|
||||
[ "a++ + b++", "a+++b++" ],
|
||||
[ "a++ + + ++b", "a+++ + ++b" ],
|
||||
[ "a++ + + --b", "a+++ +--b" ],
|
||||
[ "a++ + + b", "a+++ +b" ],
|
||||
[ "a++ + + b--", "a+++ +b--" ],
|
||||
[ "a++ + + b++", "a+++ +b++" ],
|
||||
[ "a++ + - ++b", "a+++-++b" ],
|
||||
[ "a++ + - --b", "a+++- --b" ],
|
||||
[ "a++ + - b", "a+++-b" ],
|
||||
[ "a++ + - b--", "a+++-b--" ],
|
||||
[ "a++ + - b++", "a+++-b++" ],
|
||||
[ "a++ - ++b", "a++-++b" ],
|
||||
[ "a++ - --b", "a++- --b" ],
|
||||
[ "a++ - b", "a++-b" ],
|
||||
[ "a++ - b--", "a++-b--" ],
|
||||
[ "a++ - b++", "a++-b++" ],
|
||||
[ "a++ - + ++b", "a++-+ ++b" ],
|
||||
[ "a++ - + --b", "a++-+--b" ],
|
||||
[ "a++ - + b", "a++-+b" ],
|
||||
[ "a++ - + b--", "a++-+b--" ],
|
||||
[ "a++ - + b++", "a++-+b++" ],
|
||||
[ "a++ - - ++b", "a++- -++b" ],
|
||||
[ "a++ - - --b", "a++- - --b" ],
|
||||
[ "a++ - - b", "a++- -b" ],
|
||||
[ "a++ - - b--", "a++- -b--" ],
|
||||
[ "a++ - - b++", "a++- -b++" ],
|
||||
[ "+ ++a + ++b", "+ ++a+ ++b" ],
|
||||
[ "+ ++a + --b", "+ ++a+--b" ],
|
||||
[ "+ ++a + b", "+ ++a+b" ],
|
||||
[ "+ ++a + b--", "+ ++a+b--" ],
|
||||
[ "+ ++a + b++", "+ ++a+b++" ],
|
||||
[ "+ ++a + + ++b", "+ ++a+ + ++b" ],
|
||||
[ "+ ++a + + --b", "+ ++a+ +--b" ],
|
||||
[ "+ ++a + + b", "+ ++a+ +b" ],
|
||||
[ "+ ++a + + b--", "+ ++a+ +b--" ],
|
||||
[ "+ ++a + + b++", "+ ++a+ +b++" ],
|
||||
[ "+ ++a + - ++b", "+ ++a+-++b" ],
|
||||
[ "+ ++a + - --b", "+ ++a+- --b" ],
|
||||
[ "+ ++a + - b", "+ ++a+-b" ],
|
||||
[ "+ ++a + - b--", "+ ++a+-b--" ],
|
||||
[ "+ ++a + - b++", "+ ++a+-b++" ],
|
||||
[ "+ ++a - ++b", "+ ++a-++b" ],
|
||||
[ "+ ++a - --b", "+ ++a- --b" ],
|
||||
[ "+ ++a - b", "+ ++a-b" ],
|
||||
[ "+ ++a - b--", "+ ++a-b--" ],
|
||||
[ "+ ++a - b++", "+ ++a-b++" ],
|
||||
[ "+ ++a - + ++b", "+ ++a-+ ++b" ],
|
||||
[ "+ ++a - + --b", "+ ++a-+--b" ],
|
||||
[ "+ ++a - + b", "+ ++a-+b" ],
|
||||
[ "+ ++a - + b--", "+ ++a-+b--" ],
|
||||
[ "+ ++a - + b++", "+ ++a-+b++" ],
|
||||
[ "+ ++a - - ++b", "+ ++a- -++b" ],
|
||||
[ "+ ++a - - --b", "+ ++a- - --b" ],
|
||||
[ "+ ++a - - b", "+ ++a- -b" ],
|
||||
[ "+ ++a - - b--", "+ ++a- -b--" ],
|
||||
[ "+ ++a - - b++", "+ ++a- -b++" ],
|
||||
[ "+ --a + ++b", "+--a+ ++b" ],
|
||||
[ "+ --a + --b", "+--a+--b" ],
|
||||
[ "+ --a + b", "+--a+b" ],
|
||||
[ "+ --a + b--", "+--a+b--" ],
|
||||
[ "+ --a + b++", "+--a+b++" ],
|
||||
[ "+ --a + + ++b", "+--a+ + ++b" ],
|
||||
[ "+ --a + + --b", "+--a+ +--b" ],
|
||||
[ "+ --a + + b", "+--a+ +b" ],
|
||||
[ "+ --a + + b--", "+--a+ +b--" ],
|
||||
[ "+ --a + + b++", "+--a+ +b++" ],
|
||||
[ "+ --a + - ++b", "+--a+-++b" ],
|
||||
[ "+ --a + - --b", "+--a+- --b" ],
|
||||
[ "+ --a + - b", "+--a+-b" ],
|
||||
[ "+ --a + - b--", "+--a+-b--" ],
|
||||
[ "+ --a + - b++", "+--a+-b++" ],
|
||||
[ "+ --a - ++b", "+--a-++b" ],
|
||||
[ "+ --a - --b", "+--a- --b" ],
|
||||
[ "+ --a - b", "+--a-b" ],
|
||||
[ "+ --a - b--", "+--a-b--" ],
|
||||
[ "+ --a - b++", "+--a-b++" ],
|
||||
[ "+ --a - + ++b", "+--a-+ ++b" ],
|
||||
[ "+ --a - + --b", "+--a-+--b" ],
|
||||
[ "+ --a - + b", "+--a-+b" ],
|
||||
[ "+ --a - + b--", "+--a-+b--" ],
|
||||
[ "+ --a - + b++", "+--a-+b++" ],
|
||||
[ "+ --a - - ++b", "+--a- -++b" ],
|
||||
[ "+ --a - - --b", "+--a- - --b" ],
|
||||
[ "+ --a - - b", "+--a- -b" ],
|
||||
[ "+ --a - - b--", "+--a- -b--" ],
|
||||
[ "+ --a - - b++", "+--a- -b++" ],
|
||||
[ "+ a + ++b", "+a+ ++b" ],
|
||||
[ "+ a + --b", "+a+--b" ],
|
||||
[ "+ a + b", "+a+b" ],
|
||||
[ "+ a + b--", "+a+b--" ],
|
||||
[ "+ a + b++", "+a+b++" ],
|
||||
[ "+ a + + ++b", "+a+ + ++b" ],
|
||||
[ "+ a + + --b", "+a+ +--b" ],
|
||||
[ "+ a + + b", "+a+ +b" ],
|
||||
[ "+ a + + b--", "+a+ +b--" ],
|
||||
[ "+ a + + b++", "+a+ +b++" ],
|
||||
[ "+ a + - ++b", "+a+-++b" ],
|
||||
[ "+ a + - --b", "+a+- --b" ],
|
||||
[ "+ a + - b", "+a+-b" ],
|
||||
[ "+ a + - b--", "+a+-b--" ],
|
||||
[ "+ a + - b++", "+a+-b++" ],
|
||||
[ "+ a - ++b", "+a-++b" ],
|
||||
[ "+ a - --b", "+a- --b" ],
|
||||
[ "+ a - b", "+a-b" ],
|
||||
[ "+ a - b--", "+a-b--" ],
|
||||
[ "+ a - b++", "+a-b++" ],
|
||||
[ "+ a - + ++b", "+a-+ ++b" ],
|
||||
[ "+ a - + --b", "+a-+--b" ],
|
||||
[ "+ a - + b", "+a-+b" ],
|
||||
[ "+ a - + b--", "+a-+b--" ],
|
||||
[ "+ a - + b++", "+a-+b++" ],
|
||||
[ "+ a - - ++b", "+a- -++b" ],
|
||||
[ "+ a - - --b", "+a- - --b" ],
|
||||
[ "+ a - - b", "+a- -b" ],
|
||||
[ "+ a - - b--", "+a- -b--" ],
|
||||
[ "+ a - - b++", "+a- -b++" ],
|
||||
[ "+ a-- + ++b", "+a--+ ++b" ],
|
||||
[ "+ a-- + --b", "+a--+--b" ],
|
||||
[ "+ a-- + b", "+a--+b" ],
|
||||
[ "+ a-- + b--", "+a--+b--" ],
|
||||
[ "+ a-- + b++", "+a--+b++" ],
|
||||
[ "+ a-- + + ++b", "+a--+ + ++b" ],
|
||||
[ "+ a-- + + --b", "+a--+ +--b" ],
|
||||
[ "+ a-- + + b", "+a--+ +b" ],
|
||||
[ "+ a-- + + b--", "+a--+ +b--" ],
|
||||
[ "+ a-- + + b++", "+a--+ +b++" ],
|
||||
[ "+ a-- + - ++b", "+a--+-++b" ],
|
||||
[ "+ a-- + - --b", "+a--+- --b" ],
|
||||
[ "+ a-- + - b", "+a--+-b" ],
|
||||
[ "+ a-- + - b--", "+a--+-b--" ],
|
||||
[ "+ a-- + - b++", "+a--+-b++" ],
|
||||
[ "+ a-- - ++b", "+a---++b" ],
|
||||
[ "+ a-- - --b", "+a--- --b" ],
|
||||
[ "+ a-- - b", "+a---b" ],
|
||||
[ "+ a-- - b--", "+a---b--" ],
|
||||
[ "+ a-- - b++", "+a---b++" ],
|
||||
[ "+ a-- - + ++b", "+a---+ ++b" ],
|
||||
[ "+ a-- - + --b", "+a---+--b" ],
|
||||
[ "+ a-- - + b", "+a---+b" ],
|
||||
[ "+ a-- - + b--", "+a---+b--" ],
|
||||
[ "+ a-- - + b++", "+a---+b++" ],
|
||||
[ "+ a-- - - ++b", "+a--- -++b" ],
|
||||
[ "+ a-- - - --b", "+a--- - --b" ],
|
||||
[ "+ a-- - - b", "+a--- -b" ],
|
||||
[ "+ a-- - - b--", "+a--- -b--" ],
|
||||
[ "+ a-- - - b++", "+a--- -b++" ],
|
||||
[ "+ a++ + ++b", "+a+++ ++b" ],
|
||||
[ "+ a++ + --b", "+a+++--b" ],
|
||||
[ "+ a++ + b", "+a+++b" ],
|
||||
[ "+ a++ + b--", "+a+++b--" ],
|
||||
[ "+ a++ + b++", "+a+++b++" ],
|
||||
[ "+ a++ + + ++b", "+a+++ + ++b" ],
|
||||
[ "+ a++ + + --b", "+a+++ +--b" ],
|
||||
[ "+ a++ + + b", "+a+++ +b" ],
|
||||
[ "+ a++ + + b--", "+a+++ +b--" ],
|
||||
[ "+ a++ + + b++", "+a+++ +b++" ],
|
||||
[ "+ a++ + - ++b", "+a+++-++b" ],
|
||||
[ "+ a++ + - --b", "+a+++- --b" ],
|
||||
[ "+ a++ + - b", "+a+++-b" ],
|
||||
[ "+ a++ + - b--", "+a+++-b--" ],
|
||||
[ "+ a++ + - b++", "+a+++-b++" ],
|
||||
[ "+ a++ - ++b", "+a++-++b" ],
|
||||
[ "+ a++ - --b", "+a++- --b" ],
|
||||
[ "+ a++ - b", "+a++-b" ],
|
||||
[ "+ a++ - b--", "+a++-b--" ],
|
||||
[ "+ a++ - b++", "+a++-b++" ],
|
||||
[ "+ a++ - + ++b", "+a++-+ ++b" ],
|
||||
[ "+ a++ - + --b", "+a++-+--b" ],
|
||||
[ "+ a++ - + b", "+a++-+b" ],
|
||||
[ "+ a++ - + b--", "+a++-+b--" ],
|
||||
[ "+ a++ - + b++", "+a++-+b++" ],
|
||||
[ "+ a++ - - ++b", "+a++- -++b" ],
|
||||
[ "+ a++ - - --b", "+a++- - --b" ],
|
||||
[ "+ a++ - - b", "+a++- -b" ],
|
||||
[ "+ a++ - - b--", "+a++- -b--" ],
|
||||
[ "+ a++ - - b++", "+a++- -b++" ],
|
||||
[ "- ++a + ++b", "-++a+ ++b" ],
|
||||
[ "- ++a + --b", "-++a+--b" ],
|
||||
[ "- ++a + b", "-++a+b" ],
|
||||
[ "- ++a + b--", "-++a+b--" ],
|
||||
[ "- ++a + b++", "-++a+b++" ],
|
||||
[ "- ++a + + ++b", "-++a+ + ++b" ],
|
||||
[ "- ++a + + --b", "-++a+ +--b" ],
|
||||
[ "- ++a + + b", "-++a+ +b" ],
|
||||
[ "- ++a + + b--", "-++a+ +b--" ],
|
||||
[ "- ++a + + b++", "-++a+ +b++" ],
|
||||
[ "- ++a + - ++b", "-++a+-++b" ],
|
||||
[ "- ++a + - --b", "-++a+- --b" ],
|
||||
[ "- ++a + - b", "-++a+-b" ],
|
||||
[ "- ++a + - b--", "-++a+-b--" ],
|
||||
[ "- ++a + - b++", "-++a+-b++" ],
|
||||
[ "- ++a - ++b", "-++a-++b" ],
|
||||
[ "- ++a - --b", "-++a- --b" ],
|
||||
[ "- ++a - b", "-++a-b" ],
|
||||
[ "- ++a - b--", "-++a-b--" ],
|
||||
[ "- ++a - b++", "-++a-b++" ],
|
||||
[ "- ++a - + ++b", "-++a-+ ++b" ],
|
||||
[ "- ++a - + --b", "-++a-+--b" ],
|
||||
[ "- ++a - + b", "-++a-+b" ],
|
||||
[ "- ++a - + b--", "-++a-+b--" ],
|
||||
[ "- ++a - + b++", "-++a-+b++" ],
|
||||
[ "- ++a - - ++b", "-++a- -++b" ],
|
||||
[ "- ++a - - --b", "-++a- - --b" ],
|
||||
[ "- ++a - - b", "-++a- -b" ],
|
||||
[ "- ++a - - b--", "-++a- -b--" ],
|
||||
[ "- ++a - - b++", "-++a- -b++" ],
|
||||
[ "- --a + ++b", "- --a+ ++b" ],
|
||||
[ "- --a + --b", "- --a+--b" ],
|
||||
[ "- --a + b", "- --a+b" ],
|
||||
[ "- --a + b--", "- --a+b--" ],
|
||||
[ "- --a + b++", "- --a+b++" ],
|
||||
[ "- --a + + ++b", "- --a+ + ++b" ],
|
||||
[ "- --a + + --b", "- --a+ +--b" ],
|
||||
[ "- --a + + b", "- --a+ +b" ],
|
||||
[ "- --a + + b--", "- --a+ +b--" ],
|
||||
[ "- --a + + b++", "- --a+ +b++" ],
|
||||
[ "- --a + - ++b", "- --a+-++b" ],
|
||||
[ "- --a + - --b", "- --a+- --b" ],
|
||||
[ "- --a + - b", "- --a+-b" ],
|
||||
[ "- --a + - b--", "- --a+-b--" ],
|
||||
[ "- --a + - b++", "- --a+-b++" ],
|
||||
[ "- --a - ++b", "- --a-++b" ],
|
||||
[ "- --a - --b", "- --a- --b" ],
|
||||
[ "- --a - b", "- --a-b" ],
|
||||
[ "- --a - b--", "- --a-b--" ],
|
||||
[ "- --a - b++", "- --a-b++" ],
|
||||
[ "- --a - + ++b", "- --a-+ ++b" ],
|
||||
[ "- --a - + --b", "- --a-+--b" ],
|
||||
[ "- --a - + b", "- --a-+b" ],
|
||||
[ "- --a - + b--", "- --a-+b--" ],
|
||||
[ "- --a - + b++", "- --a-+b++" ],
|
||||
[ "- --a - - ++b", "- --a- -++b" ],
|
||||
[ "- --a - - --b", "- --a- - --b" ],
|
||||
[ "- --a - - b", "- --a- -b" ],
|
||||
[ "- --a - - b--", "- --a- -b--" ],
|
||||
[ "- --a - - b++", "- --a- -b++" ],
|
||||
[ "- a + ++b", "-a+ ++b" ],
|
||||
[ "- a + --b", "-a+--b" ],
|
||||
[ "- a + b", "-a+b" ],
|
||||
[ "- a + b--", "-a+b--" ],
|
||||
[ "- a + b++", "-a+b++" ],
|
||||
[ "- a + + ++b", "-a+ + ++b" ],
|
||||
[ "- a + + --b", "-a+ +--b" ],
|
||||
[ "- a + + b", "-a+ +b" ],
|
||||
[ "- a + + b--", "-a+ +b--" ],
|
||||
[ "- a + + b++", "-a+ +b++" ],
|
||||
[ "- a + - ++b", "-a+-++b" ],
|
||||
[ "- a + - --b", "-a+- --b" ],
|
||||
[ "- a + - b", "-a+-b" ],
|
||||
[ "- a + - b--", "-a+-b--" ],
|
||||
[ "- a + - b++", "-a+-b++" ],
|
||||
[ "- a - ++b", "-a-++b" ],
|
||||
[ "- a - --b", "-a- --b" ],
|
||||
[ "- a - b", "-a-b" ],
|
||||
[ "- a - b--", "-a-b--" ],
|
||||
[ "- a - b++", "-a-b++" ],
|
||||
[ "- a - + ++b", "-a-+ ++b" ],
|
||||
[ "- a - + --b", "-a-+--b" ],
|
||||
[ "- a - + b", "-a-+b" ],
|
||||
[ "- a - + b--", "-a-+b--" ],
|
||||
[ "- a - + b++", "-a-+b++" ],
|
||||
[ "- a - - ++b", "-a- -++b" ],
|
||||
[ "- a - - --b", "-a- - --b" ],
|
||||
[ "- a - - b", "-a- -b" ],
|
||||
[ "- a - - b--", "-a- -b--" ],
|
||||
[ "- a - - b++", "-a- -b++" ],
|
||||
[ "- a-- + ++b", "-a--+ ++b" ],
|
||||
[ "- a-- + --b", "-a--+--b" ],
|
||||
[ "- a-- + b", "-a--+b" ],
|
||||
[ "- a-- + b--", "-a--+b--" ],
|
||||
[ "- a-- + b++", "-a--+b++" ],
|
||||
[ "- a-- + + ++b", "-a--+ + ++b" ],
|
||||
[ "- a-- + + --b", "-a--+ +--b" ],
|
||||
[ "- a-- + + b", "-a--+ +b" ],
|
||||
[ "- a-- + + b--", "-a--+ +b--" ],
|
||||
[ "- a-- + + b++", "-a--+ +b++" ],
|
||||
[ "- a-- + - ++b", "-a--+-++b" ],
|
||||
[ "- a-- + - --b", "-a--+- --b" ],
|
||||
[ "- a-- + - b", "-a--+-b" ],
|
||||
[ "- a-- + - b--", "-a--+-b--" ],
|
||||
[ "- a-- + - b++", "-a--+-b++" ],
|
||||
[ "- a-- - ++b", "-a---++b" ],
|
||||
[ "- a-- - --b", "-a--- --b" ],
|
||||
[ "- a-- - b", "-a---b" ],
|
||||
[ "- a-- - b--", "-a---b--" ],
|
||||
[ "- a-- - b++", "-a---b++" ],
|
||||
[ "- a-- - + ++b", "-a---+ ++b" ],
|
||||
[ "- a-- - + --b", "-a---+--b" ],
|
||||
[ "- a-- - + b", "-a---+b" ],
|
||||
[ "- a-- - + b--", "-a---+b--" ],
|
||||
[ "- a-- - + b++", "-a---+b++" ],
|
||||
[ "- a-- - - ++b", "-a--- -++b" ],
|
||||
[ "- a-- - - --b", "-a--- - --b" ],
|
||||
[ "- a-- - - b", "-a--- -b" ],
|
||||
[ "- a-- - - b--", "-a--- -b--" ],
|
||||
[ "- a-- - - b++", "-a--- -b++" ],
|
||||
[ "- a++ + ++b", "-a+++ ++b" ],
|
||||
[ "- a++ + --b", "-a+++--b" ],
|
||||
[ "- a++ + b", "-a+++b" ],
|
||||
[ "- a++ + b--", "-a+++b--" ],
|
||||
[ "- a++ + b++", "-a+++b++" ],
|
||||
[ "- a++ + + ++b", "-a+++ + ++b" ],
|
||||
[ "- a++ + + --b", "-a+++ +--b" ],
|
||||
[ "- a++ + + b", "-a+++ +b" ],
|
||||
[ "- a++ + + b--", "-a+++ +b--" ],
|
||||
[ "- a++ + + b++", "-a+++ +b++" ],
|
||||
[ "- a++ + - ++b", "-a+++-++b" ],
|
||||
[ "- a++ + - --b", "-a+++- --b" ],
|
||||
[ "- a++ + - b", "-a+++-b" ],
|
||||
[ "- a++ + - b--", "-a+++-b--" ],
|
||||
[ "- a++ + - b++", "-a+++-b++" ],
|
||||
[ "- a++ - ++b", "-a++-++b" ],
|
||||
[ "- a++ - --b", "-a++- --b" ],
|
||||
[ "- a++ - b", "-a++-b" ],
|
||||
[ "- a++ - b--", "-a++-b--" ],
|
||||
[ "- a++ - b++", "-a++-b++" ],
|
||||
[ "- a++ - + ++b", "-a++-+ ++b" ],
|
||||
[ "- a++ - + --b", "-a++-+--b" ],
|
||||
[ "- a++ - + b", "-a++-+b" ],
|
||||
[ "- a++ - + b--", "-a++-+b--" ],
|
||||
[ "- a++ - + b++", "-a++-+b++" ],
|
||||
[ "- a++ - - ++b", "-a++- -++b" ],
|
||||
[ "- a++ - - --b", "-a++- - --b" ],
|
||||
[ "- a++ - - b", "-a++- -b" ],
|
||||
[ "- a++ - - b--", "-a++- -b--" ],
|
||||
[ "- a++ - - b++", "-a++- -b++" ],
|
||||
].forEach(function(exp) {
|
||||
assert.strictEqual(UglifyJS.parse(exp[0]).print_to_string(), exp[1] + ";");
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -19,7 +19,7 @@ describe("String literals", function() {
|
||||
|
||||
var error = function(e) {
|
||||
return e instanceof UglifyJS.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Unterminated string constant";
|
||||
e.message === "Unterminated string constant";
|
||||
};
|
||||
|
||||
for (var input in inputs) {
|
||||
@@ -49,7 +49,7 @@ describe("String literals", function() {
|
||||
|
||||
var error = function(e) {
|
||||
return e instanceof UglifyJS.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Legacy octal escape sequences are not allowed in strict mode";
|
||||
e.message === "Legacy octal escape sequences are not allowed in strict mode";
|
||||
}
|
||||
|
||||
for (var input in inputs) {
|
||||
|
||||
@@ -9,7 +9,7 @@ describe("With", function() {
|
||||
}
|
||||
var error = function(e) {
|
||||
return e instanceof uglify.JS_Parse_Error &&
|
||||
e.message === "SyntaxError: Strict mode may not include a with statement";
|
||||
e.message === "Strict mode may not include a with statement";
|
||||
}
|
||||
assert.throws(test, error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user