update tests

This commit is contained in:
alexlamsl
2017-11-05 15:59:34 +08:00
parent df9c8dfd72
commit 352a7de204
2 changed files with 53 additions and 20 deletions

View File

@@ -314,17 +314,12 @@ issue_2105_1: {
});
}
expect: {
(() => {
var quux = () => {
({
prop() {
console.log;
console.log("PASS");
};
return {
prop() {
console.log;
quux();
}
};
})().prop();
}
}).prop();
}
expect_stdout: "PASS"
node_version: ">=4"
@@ -360,17 +355,12 @@ issue_2105_2: {
});
}
expect: {
(() => {
var quux = () => {
({
prop: () => {
console.log;
console.log("PASS");
};
return {
prop: () => {
console.log;
quux();
}
};
})().prop();
}
}).prop();
}
expect_stdout: "PASS"
node_version: ">=6"

View File

@@ -3622,6 +3622,49 @@ issue_2420_2: {
]
}
issue_2420_3: {
options = {
reduce_vars: true,
unused: true,
}
input: {
function f() {
var that = this;
if (that.bar)
that.foo();
else
((that, self) => {
console.log(this === that, self === this, that === self);
})(that, this);
}
f.call({
bar: 1,
foo: function() { console.log("foo", this.bar); },
});
f.call({});
}
expect: {
function f() {
if (this.bar)
this.foo();
else
((that, self) => {
console.log(this === that, self === this, that === self);
})(this, this);
}
f.call({
bar: 1,
foo: function() { console.log("foo", this.bar); },
});
f.call({});
}
expect_stdout: [
"foo 1",
"true true true",
]
node_version: ">=4"
}
issue_2423_1: {
options = {
reduce_vars: true,