diff --git a/test/fixtures/transformation/let-scoping/for-break-continue-return/actual.js b/test/fixtures/transformation/let-scoping/for-break-continue-return/actual.js new file mode 100644 index 0000000000..387d702154 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-break-continue-return/actual.js @@ -0,0 +1,10 @@ +for (let i in nums) { + fns.push(function () { return i; }); + if (i === 1) { + continue; + } else if (i === 2) { + break; + } else if (i === 3) { + return i; + } +} diff --git a/test/fixtures/transformation/let-scoping/for-break-continue-return/expected.js b/test/fixtures/transformation/let-scoping/for-break-continue-return/expected.js new file mode 100644 index 0000000000..7287b97822 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-break-continue-return/expected.js @@ -0,0 +1,24 @@ +"use strict"; + +_loop: for (var i in nums) { + var _ret = (function (i) { + fns.push(function () { + return i; + }); + if (i === 1) { + return "continue"; + } else if (i === 2) { + return "break"; + } else if (i === 3) { + return { + v: i + }; + } + })(i); + + switch (_ret) { + case "break": break _loop; + case "continue": continue _loop; + default: if (typeof _ret === "object") return _ret.v; + } +} diff --git a/test/fixtures/transformation/let-scoping/for-break/actual.js b/test/fixtures/transformation/let-scoping/for-break/actual.js new file mode 100644 index 0000000000..ef32b88f58 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-break/actual.js @@ -0,0 +1,4 @@ +for (let i in nums) { + fns.push(function () { return i; }); + break; +} diff --git a/test/fixtures/transformation/let-scoping/for-break/expected.js b/test/fixtures/transformation/let-scoping/for-break/expected.js new file mode 100644 index 0000000000..96fc3616ef --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-break/expected.js @@ -0,0 +1,12 @@ +"use strict"; + +_loop: for (var i in nums) { + var _ret = (function (i) { + fns.push(function () { + return i; + }); + return "break"; + })(i); + + if (_ret === "break") break _loop; +} diff --git a/test/fixtures/transformation/let-scoping/for-continue/actual.js b/test/fixtures/transformation/let-scoping/for-continue/actual.js new file mode 100644 index 0000000000..4107632d3b --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-continue/actual.js @@ -0,0 +1,4 @@ +for (let i in nums) { + fns.push(function () { return i; }); + continue; +} diff --git a/test/fixtures/transformation/let-scoping/for-continue/expected.js b/test/fixtures/transformation/let-scoping/for-continue/expected.js new file mode 100644 index 0000000000..658e48536b --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-continue/expected.js @@ -0,0 +1,12 @@ +"use strict"; + +_loop: for (var i in nums) { + var _ret = (function (i) { + fns.push(function () { + return i; + }); + return "continue"; + })(i); + + if (_ret === "continue") continue _loop; +} diff --git a/test/fixtures/transformation/let-scoping/for-return-undefined/actual.js b/test/fixtures/transformation/let-scoping/for-return-undefined/actual.js new file mode 100644 index 0000000000..b7613b4f31 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-return-undefined/actual.js @@ -0,0 +1,4 @@ +for (let i in nums) { + fns.push(function () { return i; }); + return; +} diff --git a/test/fixtures/transformation/let-scoping/for-return-undefined/expected.js b/test/fixtures/transformation/let-scoping/for-return-undefined/expected.js new file mode 100644 index 0000000000..4937ff43c2 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-return-undefined/expected.js @@ -0,0 +1,14 @@ +"use strict"; + +for (var i in nums) { + var _ret = (function (i) { + fns.push(function () { + return i; + }); + return { + v: undefined + }; + })(i); + + if (typeof _ret === "object") return _ret.v; +} diff --git a/test/fixtures/transformation/let-scoping/for-return/actual.js b/test/fixtures/transformation/let-scoping/for-return/actual.js new file mode 100644 index 0000000000..8c636baaca --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-return/actual.js @@ -0,0 +1,4 @@ +for (let i in nums) { + fns.push(function () { return i; }); + return i; +} diff --git a/test/fixtures/transformation/let-scoping/for-return/expected.js b/test/fixtures/transformation/let-scoping/for-return/expected.js new file mode 100644 index 0000000000..d26f70a201 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/for-return/expected.js @@ -0,0 +1,14 @@ +"use strict"; + +for (var i in nums) { + var _ret = (function (i) { + fns.push(function () { + return i; + }); + return { + v: i + }; + })(i); + + if (typeof _ret === "object") return _ret.v; +} diff --git a/test/fixtures/transformation/let-scoping/function/actual.js b/test/fixtures/transformation/let-scoping/function/actual.js new file mode 100644 index 0000000000..2b9635ec33 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/function/actual.js @@ -0,0 +1,3 @@ +function test() { + let foo = "bar"; +} diff --git a/test/fixtures/transformation/let-scoping/function/expected.js b/test/fixtures/transformation/let-scoping/function/expected.js new file mode 100644 index 0000000000..dfd0ab9301 --- /dev/null +++ b/test/fixtures/transformation/let-scoping/function/expected.js @@ -0,0 +1,5 @@ +"use strict"; + +function test() { + var foo = "bar"; +} diff --git a/test/fixtures/transformation/let-scoping/program/actual.js b/test/fixtures/transformation/let-scoping/program/actual.js new file mode 100644 index 0000000000..0de89f04bf --- /dev/null +++ b/test/fixtures/transformation/let-scoping/program/actual.js @@ -0,0 +1 @@ +let test = "foo"; diff --git a/test/fixtures/transformation/let-scoping/program/expected.js b/test/fixtures/transformation/let-scoping/program/expected.js new file mode 100644 index 0000000000..c8ee0b911a --- /dev/null +++ b/test/fixtures/transformation/let-scoping/program/expected.js @@ -0,0 +1,3 @@ +"use strict"; + +var test = "foo"; diff --git a/test/fixtures/transformation/let-scoping/closure/actual.js b/test/fixtures/transformation/traceur-let-scoping/closure/actual.js similarity index 100% rename from test/fixtures/transformation/let-scoping/closure/actual.js rename to test/fixtures/transformation/traceur-let-scoping/closure/actual.js diff --git a/test/fixtures/transformation/let-scoping/closure/expected.js b/test/fixtures/transformation/traceur-let-scoping/closure/expected.js similarity index 100% rename from test/fixtures/transformation/let-scoping/closure/expected.js rename to test/fixtures/transformation/traceur-let-scoping/closure/expected.js diff --git a/test/fixtures/transformation/let-scoping/deep-nested/exec.js b/test/fixtures/transformation/traceur-let-scoping/deep-nested/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/deep-nested/exec.js rename to test/fixtures/transformation/traceur-let-scoping/deep-nested/exec.js diff --git a/test/fixtures/transformation/let-scoping/for-in-initializers/exec.js b/test/fixtures/transformation/traceur-let-scoping/for-in-initializers/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/for-in-initializers/exec.js rename to test/fixtures/transformation/traceur-let-scoping/for-in-initializers/exec.js diff --git a/test/fixtures/transformation/let-scoping/for-initializers/exec.js b/test/fixtures/transformation/traceur-let-scoping/for-initializers/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/for-initializers/exec.js rename to test/fixtures/transformation/traceur-let-scoping/for-initializers/exec.js diff --git a/test/fixtures/transformation/let-scoping/function-declaration/actual.js b/test/fixtures/transformation/traceur-let-scoping/function-declaration/actual.js similarity index 100% rename from test/fixtures/transformation/let-scoping/function-declaration/actual.js rename to test/fixtures/transformation/traceur-let-scoping/function-declaration/actual.js diff --git a/test/fixtures/transformation/let-scoping/function-declaration/expected.js b/test/fixtures/transformation/traceur-let-scoping/function-declaration/expected.js similarity index 100% rename from test/fixtures/transformation/let-scoping/function-declaration/expected.js rename to test/fixtures/transformation/traceur-let-scoping/function-declaration/expected.js diff --git a/test/fixtures/transformation/let-scoping/in-class/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-class/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-class/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-class/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-closure/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-closure/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-closure/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-closure/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for-break-inner/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for-break-inner/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for-break-inner/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for-break-inner/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for-break-named/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for-break-named/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for-break-named/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for-break-named/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for-break/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for-break/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for-break/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for-break/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for-continue-inner/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for-continue-inner/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for-continue-inner/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for-continue-inner/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for-continue-named/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for-continue-named/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for-continue-named/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for-continue-named/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for-continue/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for-continue/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for-continue/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for-continue/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-for/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-for/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-for/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-for/exec.js diff --git a/test/fixtures/transformation/let-scoping/in-properties/exec.js b/test/fixtures/transformation/traceur-let-scoping/in-properties/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/in-properties/exec.js rename to test/fixtures/transformation/traceur-let-scoping/in-properties/exec.js diff --git a/test/fixtures/transformation/let-scoping/initializer-for-1/exec.js b/test/fixtures/transformation/traceur-let-scoping/initializer-for-1/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/initializer-for-1/exec.js rename to test/fixtures/transformation/traceur-let-scoping/initializer-for-1/exec.js diff --git a/test/fixtures/transformation/let-scoping/initializer-for-2/exec.js b/test/fixtures/transformation/traceur-let-scoping/initializer-for-2/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/initializer-for-2/exec.js rename to test/fixtures/transformation/traceur-let-scoping/initializer-for-2/exec.js diff --git a/test/fixtures/transformation/let-scoping/initializer-for-3/exec.js b/test/fixtures/transformation/traceur-let-scoping/initializer-for-3/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/initializer-for-3/exec.js rename to test/fixtures/transformation/traceur-let-scoping/initializer-for-3/exec.js diff --git a/test/fixtures/transformation/let-scoping/initializer-for-in/exec.js b/test/fixtures/transformation/traceur-let-scoping/initializer-for-in/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/initializer-for-in/exec.js rename to test/fixtures/transformation/traceur-let-scoping/initializer-for-in/exec.js diff --git a/test/fixtures/transformation/let-scoping/nested-conflict/exec.js b/test/fixtures/transformation/traceur-let-scoping/nested-conflict/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/nested-conflict/exec.js rename to test/fixtures/transformation/traceur-let-scoping/nested-conflict/exec.js diff --git a/test/fixtures/transformation/let-scoping/nested-function-1/exec.js b/test/fixtures/transformation/traceur-let-scoping/nested-function-1/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/nested-function-1/exec.js rename to test/fixtures/transformation/traceur-let-scoping/nested-function-1/exec.js diff --git a/test/fixtures/transformation/let-scoping/nested-function-2/exec.js b/test/fixtures/transformation/traceur-let-scoping/nested-function-2/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/nested-function-2/exec.js rename to test/fixtures/transformation/traceur-let-scoping/nested-function-2/exec.js diff --git a/test/fixtures/transformation/let-scoping/nested-function-3/exec.js b/test/fixtures/transformation/traceur-let-scoping/nested-function-3/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/nested-function-3/exec.js rename to test/fixtures/transformation/traceur-let-scoping/nested-function-3/exec.js diff --git a/test/fixtures/transformation/let-scoping/nested/exec.js b/test/fixtures/transformation/traceur-let-scoping/nested/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/nested/exec.js rename to test/fixtures/transformation/traceur-let-scoping/nested/exec.js diff --git a/test/fixtures/transformation/let-scoping/no-initializer-global/exec.js b/test/fixtures/transformation/traceur-let-scoping/no-initializer-global/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/no-initializer-global/exec.js rename to test/fixtures/transformation/traceur-let-scoping/no-initializer-global/exec.js diff --git a/test/fixtures/transformation/let-scoping/no-initializer/exec.js b/test/fixtures/transformation/traceur-let-scoping/no-initializer/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/no-initializer/exec.js rename to test/fixtures/transformation/traceur-let-scoping/no-initializer/exec.js diff --git a/test/fixtures/transformation/let-scoping/no-renaming/actual.js b/test/fixtures/transformation/traceur-let-scoping/no-renaming/actual.js similarity index 100% rename from test/fixtures/transformation/let-scoping/no-renaming/actual.js rename to test/fixtures/transformation/traceur-let-scoping/no-renaming/actual.js diff --git a/test/fixtures/transformation/let-scoping/no-renaming/expected.js b/test/fixtures/transformation/traceur-let-scoping/no-renaming/expected.js similarity index 100% rename from test/fixtures/transformation/let-scoping/no-renaming/expected.js rename to test/fixtures/transformation/traceur-let-scoping/no-renaming/expected.js diff --git a/test/fixtures/transformation/let-scoping/regress-1381/exec.js b/test/fixtures/transformation/traceur-let-scoping/regress-1381/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/regress-1381/exec.js rename to test/fixtures/transformation/traceur-let-scoping/regress-1381/exec.js diff --git a/test/fixtures/transformation/let-scoping/with-for-in/exec.js b/test/fixtures/transformation/traceur-let-scoping/with-for-in/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/with-for-in/exec.js rename to test/fixtures/transformation/traceur-let-scoping/with-for-in/exec.js diff --git a/test/fixtures/transformation/let-scoping/with-for/exec.js b/test/fixtures/transformation/traceur-let-scoping/with-for/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/with-for/exec.js rename to test/fixtures/transformation/traceur-let-scoping/with-for/exec.js diff --git a/test/fixtures/transformation/let-scoping/with-switch/exec.js b/test/fixtures/transformation/traceur-let-scoping/with-switch/exec.js similarity index 100% rename from test/fixtures/transformation/let-scoping/with-switch/exec.js rename to test/fixtures/transformation/traceur-let-scoping/with-switch/exec.js