From 0f9d930f738322119e7ade40d815f21ba398b152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 2 Nov 2022 11:59:47 +0900 Subject: [PATCH] test(es/compat): Add execution tests (#6312) --- crates/swc/tests/exec/issues-6xxx/.6301/exec.js | 2 ++ crates/swc/tests/exec/issues-6xxx/.6302/exec.js | 1 + crates/swc/tests/exec/issues-6xxx/.6303/exec.js | 2 ++ crates/swc/tests/exec/issues-6xxx/.6304/exec.js | 1 + crates/swc/tests/exec/issues-6xxx/.6305/exec.js | 1 + crates/swc/tests/exec/issues-6xxx/.6306/exec.js | 2 ++ crates/swc/tests/exec/issues-6xxx/.6307/exec.js | 1 + crates/swc/tests/exec/issues-6xxx/.6308/exec.js | 2 ++ crates/swc/tests/exec/issues-6xxx/.6309/exec.js | 1 + crates/swc/tests/exec/issues-6xxx/.6311/exec.js | 1 + 10 files changed, 14 insertions(+) create mode 100644 crates/swc/tests/exec/issues-6xxx/.6301/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6302/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6303/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6304/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6305/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6306/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6307/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6308/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6309/exec.js create mode 100644 crates/swc/tests/exec/issues-6xxx/.6311/exec.js diff --git a/crates/swc/tests/exec/issues-6xxx/.6301/exec.js b/crates/swc/tests/exec/issues-6xxx/.6301/exec.js new file mode 100644 index 00000000000..08cc1bccb34 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6301/exec.js @@ -0,0 +1,2 @@ +// input.js +try { await; } catch { console.log("caught"); } \ No newline at end of file diff --git a/crates/swc/tests/exec/issues-6xxx/.6302/exec.js b/crates/swc/tests/exec/issues-6xxx/.6302/exec.js new file mode 100644 index 00000000000..4ce9f8c0c05 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6302/exec.js @@ -0,0 +1 @@ +var [...x] = 0; diff --git a/crates/swc/tests/exec/issues-6xxx/.6303/exec.js b/crates/swc/tests/exec/issues-6xxx/.6303/exec.js new file mode 100644 index 00000000000..6f77cb95827 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6303/exec.js @@ -0,0 +1,2 @@ +"use strict"; +for ({} in [0]); \ No newline at end of file diff --git a/crates/swc/tests/exec/issues-6xxx/.6304/exec.js b/crates/swc/tests/exec/issues-6xxx/.6304/exec.js new file mode 100644 index 00000000000..62ca18957d4 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6304/exec.js @@ -0,0 +1 @@ +let [] = []; diff --git a/crates/swc/tests/exec/issues-6xxx/.6305/exec.js b/crates/swc/tests/exec/issues-6xxx/.6305/exec.js new file mode 100644 index 00000000000..1197ed377dc --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6305/exec.js @@ -0,0 +1 @@ +class x { static { super.x = 0; } } diff --git a/crates/swc/tests/exec/issues-6xxx/.6306/exec.js b/crates/swc/tests/exec/issues-6xxx/.6306/exec.js new file mode 100644 index 00000000000..7cc7940f690 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6306/exec.js @@ -0,0 +1,2 @@ +"use strict"; +x = {} = null; \ No newline at end of file diff --git a/crates/swc/tests/exec/issues-6xxx/.6307/exec.js b/crates/swc/tests/exec/issues-6xxx/.6307/exec.js new file mode 100644 index 00000000000..ea1bc4ff910 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6307/exec.js @@ -0,0 +1 @@ +class x { static y = x = 0; } \ No newline at end of file diff --git a/crates/swc/tests/exec/issues-6xxx/.6308/exec.js b/crates/swc/tests/exec/issues-6xxx/.6308/exec.js new file mode 100644 index 00000000000..fa6ea9a01c0 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6308/exec.js @@ -0,0 +1,2 @@ +var x = { x } = 0; +console.log(x); diff --git a/crates/swc/tests/exec/issues-6xxx/.6309/exec.js b/crates/swc/tests/exec/issues-6xxx/.6309/exec.js new file mode 100644 index 00000000000..e46d1a23ab1 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6309/exec.js @@ -0,0 +1 @@ +class x { static x = super.x += super.x += 0; } diff --git a/crates/swc/tests/exec/issues-6xxx/.6311/exec.js b/crates/swc/tests/exec/issues-6xxx/.6311/exec.js new file mode 100644 index 00000000000..242b3920104 --- /dev/null +++ b/crates/swc/tests/exec/issues-6xxx/.6311/exec.js @@ -0,0 +1 @@ +switch ( 0 ) { case x : function x ( ) { } }