From 61224e92a048063acb5ed74fde30c043695fd197 Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Tue, 3 Mar 2015 14:02:15 -0800 Subject: [PATCH] Add tests for 'for...of' emit when LHS is a var --- .../conformance/statements/for-ofStatements/ES5For-of1.ts | 1 + .../conformance/statements/for-ofStatements/ES5For-of2.ts | 3 +++ .../conformance/statements/for-ofStatements/ES5For-of3.ts | 2 ++ .../conformance/statements/for-ofStatements/ES5For-of4.ts | 3 +++ .../conformance/statements/for-ofStatements/ES5For-of5.ts | 3 +++ .../conformance/statements/for-ofStatements/ES5For-of6.ts | 5 +++++ .../conformance/statements/for-ofStatements/ES5For-of7.ts | 7 +++++++ 7 files changed, 24 insertions(+) create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts create mode 100644 tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts new file mode 100644 index 0000000000..24bb2f9759 --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts @@ -0,0 +1 @@ +for (var v of []) { } \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts new file mode 100644 index 0000000000..5015082a4a --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts @@ -0,0 +1,3 @@ +for (var v of []) { + var x = v; +} \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts new file mode 100644 index 0000000000..4543b6f74e --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts @@ -0,0 +1,2 @@ +for (var v of []) + var x = v; \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts new file mode 100644 index 0000000000..42fb4c01bd --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts @@ -0,0 +1,3 @@ +for (var v of []) + var x = v; +var y = v; \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts new file mode 100644 index 0000000000..ee968515d6 --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts @@ -0,0 +1,3 @@ +for (var _a of []) { + var x = _a; +} \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts new file mode 100644 index 0000000000..a04ee2d617 --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts @@ -0,0 +1,5 @@ +for (var w of []) { + for (var v of []) { + var x = [w, v]; + } +} \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts new file mode 100644 index 0000000000..6acb764677 --- /dev/null +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts @@ -0,0 +1,7 @@ +for (var w of []) { + var x = w; +} + +for (var v of []) { + var x = [w, v]; +} \ No newline at end of file