make test stdout-based

This commit is contained in:
Fábio Santos 2018-03-15 18:51:53 +00:00
parent 727eb8a5d2
commit 2e9a3092d7

View File

@ -1210,7 +1210,7 @@ issue_2994: {
if_return: true if_return: true
} }
input: { input: {
function f() { function f(condition1, condition2, condition3) {
if (condition1) { if (condition1) {
if (condition2) { if (condition2) {
return aValue; return aValue;
@ -1225,22 +1225,40 @@ issue_2994: {
} }
} }
} }
let aValue = 2, anotherValue = 3;
for (let i = 0; i < 8; ++i) {
console.log(f(i & 4, i & 2, i & 1));
}
} }
expect: { expect: {
function f() { function f(condition1, condition2, condition3) {
if (condition1) { if (condition1) {
if (condition2) return aValue; if (condition2) return aValue;
{ {
const variable1 = 'something'; const variable1 = "something";
if (condition3) { if (condition3) {
const variable2 = 'else'; const variable2 = "else";
return anotherValue; return anotherValue;
} }
return; return;
} }
} }
} }
let aValue = 2, anotherValue = 3;
for (let i = 0; i < 8; ++i)
console.log(f(4 & i, 2 & i, 1 & i));
} }
expect_stdout: [
"undefined",
"undefined",
"undefined",
"undefined",
"undefined",
"3",
"2",
"2",
]
node_version: ">=6"
} }
hoist_decl: { hoist_decl: {