})) {
return false;
}
+ } else if (line instanceof AST_EmptyStatement) {
+ continue;
} else if (stat) {
return false;
} else {
}
expect: {
var c = 0;
- !function(c) {
- c = 1 + c,
+ !function() {
+ var c;
+ c = 1 + (c = -1),
c = 1 + (c = 0),
0 !== 23..toString() && (c = 1 + c);
- }(-1),
+ }(),
console.log(c);
}
expect_stdout: "0"
}
expect: {
var c = "FAIL";
- (function() {
- !function(NaN) {
- (true << NaN) - 0/0 || (c = "PASS");
- }([]);
- })();
+ !function(NaN) {
+ (true << NaN) - 0/0 || (c = "PASS");
+ }([]);
console.log(c);
}
expect_stdout: "PASS"
}
expect: {
var c = "FAIL";
- (function() {
- (function(a) {
- if (function(a) {
- a && a();
- }(), a) c = "PASS";
- })(1);
- })(),
+ !function(a) {
+ if (function(a) {
+ a && a();
+ }(), a) c = "PASS";
+ }(1),
console.log(c);
}
expect_stdout: "PASS"
}
expect: {
var c = "FAIL";
- (function() {
- (function(a, NaN) {
- (function() {
- switch (a) {
- case a:
- break;
- case c = "PASS", NaN:
- break;
- }
- })();
- })(NaN);
- })();
+ !function(a, NaN) {
+ (function() {
+ switch (a) {
+ case a:
+ break;
+ case c = "PASS", NaN:
+ break;
+ }
+ })();
+ }(NaN);
console.log(c);
}
expect_stdout: "PASS"
}
expect: {
var x = 3, a = 1, b = 2;
- (function() {
- (function() {
- while (--x >= 0 && void (b += ++a));
- })();
- })();
+ !function() {
+ while (--x >= 0 && void (b += ++a));
+ }();
console.log(a);
}
expect_stdout: "2"
content: "inline"
}
});
- assert.strictEqual(result.code, "var bar=function(){return function(bar){return bar}}();");
+ assert.strictEqual(result.code, "var bar=function(bar){return bar};");
assert.strictEqual(warnings.length, 1);
assert.strictEqual(warnings[0], "inline source map not found");
} finally {