Skip to content

Commit

Permalink
Update test refs
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 28, 2023
1 parent a89e851 commit 9c16e7d
Show file tree
Hide file tree
Showing 28 changed files with 207 additions and 416 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//// [autoAccessor1.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | accessor b = 1;
//! 5 | static accessor c: any;
//! 6 | static accessor d = 2;
//! `----
class C1 {
accessor a;
accessor b = 1;
static accessor c;
static accessor d = 2;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor1.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | accessor b = 1;
//! 5 | static accessor c: any;
//! 6 | static accessor d = 2;
//! `----
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//// [autoAccessor1.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | accessor b = 1;
//! 5 | static accessor c: any;
//! 6 | static accessor d = 2;
//! `----
class C1 {
accessor a;
accessor b = 1;
static accessor c;
static accessor d = 2;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor1.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | accessor b = 1;
//! 5 | static accessor c: any;
//! 6 | static accessor d = 2;
//! `----
35 changes: 24 additions & 11 deletions crates/swc/tests/tsc-references/autoAccessor10.1.normal.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
//// [autoAccessor10.ts]
//!
//! x Unexpected token `a0`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a0 = 1;
//! : ^^
//! 4 | }
//! 5 |
//! 6 | class C2 {
//! `----
class C1 {
accessor a0 = 1;
}
class C2 {
#a1_accessor_storage = 1;
accessor a1 = 2;
}
class C3 {
static #a2_accessor_storage = 1;
static{
class C3_Inner {
accessor a2 = 2;
static{
#a2_accessor_storage in C3;
}
}
}
}
class C4_1 {
static accessor a3 = 1;
}
class C4_2 {
static accessor a3 = 1;
}
15 changes: 4 additions & 11 deletions crates/swc/tests/tsc-references/autoAccessor10.2.minified.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
//// [autoAccessor10.ts]
//!
//! x Unexpected token `a0`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a0 = 1;
//! : ^^
//! 4 | }
//! 5 |
//! 6 | class C2 {
//! `----
class C3 {
static #a2_accessor_storage = 1;
static{}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
//// [autoAccessor2.ts]
//!
//! x Unexpected token `#`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor #a: any;
//! : ^
//! 4 | accessor #b = 1;
//! 5 | static accessor #c: any;
//! 6 | static accessor #d = 2;
//! `----
class C1 {
accessor #a;
accessor #b = 1;
static accessor #c;
static accessor #d = 2;
constructor(){
this.#a = 3;
this.#b = 4;
}
static{
this.#c = 5;
this.#d = 6;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//// [autoAccessor2.ts]
//!
//! x Unexpected token `#`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor #a: any;
//! : ^
//! 4 | accessor #b = 1;
//! 5 | static accessor #c: any;
//! 6 | static accessor #d = 2;
//! `----
class C1 {
accessor #a;
accessor #b = 1;
static accessor #c;
static accessor #d = 2;
constructor(){
this.#a = 3, this.#b = 4;
}
static{
this.#c = 5, this.#d = 6;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//// [autoAccessor3.ts]
//!
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor "w": any;
//! : ^^^
//! 4 | accessor "x" = 1;
//! 5 | static accessor "y": any;
//! 6 | static accessor "z" = 2;
//! `----
class C1 {
accessor "w";
accessor "x" = 1;
static accessor "y";
static accessor "z" = 2;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor3.ts]
//!
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor "w": any;
//! : ^^^
//! 4 | accessor "x" = 1;
//! 5 | static accessor "y": any;
//! 6 | static accessor "z" = 2;
//! `----
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//// [autoAccessor3.ts]
//!
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor "w": any;
//! : ^^^
//! 4 | accessor "x" = 1;
//! 5 | static accessor "y": any;
//! 6 | static accessor "z" = 2;
//! `----
class C1 {
accessor "w";
accessor "x" = 1;
static accessor "y";
static accessor "z" = 2;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor3.ts]
//!
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor "w": any;
//! : ^^^
//! 4 | accessor "x" = 1;
//! 5 | static accessor "y": any;
//! 6 | static accessor "z" = 2;
//! `----
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//// [autoAccessor4.ts]
//!
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor 0: any;
//! : ^
//! 4 | accessor 1 = 1;
//! 5 | static accessor 2: any;
//! 6 | static accessor 3 = 2;
//! `----
class C1 {
accessor 0;
accessor 1 = 1;
static accessor 2;
static accessor 3 = 2;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor4.ts]
//!
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor 0: any;
//! : ^
//! 4 | accessor 1 = 1;
//! 5 | static accessor 2: any;
//! 6 | static accessor 3 = 2;
//! `----
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
//// [autoAccessor4.ts]
//!
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor 0: any;
//! : ^
//! 4 | accessor 1 = 1;
//! 5 | static accessor 2: any;
//! 6 | static accessor 3 = 2;
//! `----
class C1 {
accessor 0;
accessor 1 = 1;
static accessor 2;
static accessor 3 = 2;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor4.ts]
//!
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor 0: any;
//! : ^
//! 4 | accessor 1 = 1;
//! 5 | static accessor 2: any;
//! 6 | static accessor 3 = 2;
//! `----
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//// [autoAccessor6.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | }
//! 5 |
//! 6 | class C2 extends C1 {
//! `----
class C1 {
accessor a;
}
class C2 extends C1 {
a = 1;
}
class C3 extends C1 {
get a() {
return super.a;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor6.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | }
//! 5 |
//! 6 | class C2 extends C1 {
//! `----
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//// [autoAccessor7.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | abstract class C1 {
//! 3 | abstract accessor a: any;
//! : ^
//! 4 | }
//! 5 |
//! 6 | class C2 extends C1 {
//! `----
class C1 {
accessor a;
}
class C2 extends C1 {
accessor a = 1;
}
class C3 extends C1 {
get a() {
return 1;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
//// [autoAccessor7.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | abstract class C1 {
//! 3 | abstract accessor a: any;
//! : ^
//! 4 | }
//! 5 |
//! 6 | class C2 extends C1 {
//! `----
21 changes: 11 additions & 10 deletions crates/swc/tests/tsc-references/autoAccessor8.1.normal.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//// [autoAccessor8.ts]
//!
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async
//! ,-[1:1]
//! 1 |
//! 2 | class C1 {
//! 3 | accessor a: any;
//! : ^
//! 4 | static accessor b: any;
//! 5 | }
//! `----
class C1 {
accessor a;
static accessor b;
}
function f() {
class C3 {
accessor a;
static accessor b;
}
return C3;
}
Loading

0 comments on commit 9c16e7d

Please sign in to comment.