Skip to content

Commit

Permalink
Update test refs
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Nov 28, 2022
1 parent 44cf12e commit 9ee9210
Show file tree
Hide file tree
Showing 556 changed files with 4,228 additions and 1,906 deletions.
4 changes: 3 additions & 1 deletion crates/swc/tests/tsc-references/1.0lib-noErrors.1.normal.js
@@ -1,11 +1,13 @@
//// [1.0lib-noErrors.ts]
//!
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode
//! ,-[27:1]
//! ,-[26:3]
//! 26 | * Evaluates JavaScript code and executes it.
//! 27 | * @param x A String value that contains valid JavaScript code.
//! 28 | */
//! 29 | declare function eval(x: string): any;
//! : ^^^^
//! 30 |
//! 31 | /**
//! 32 | * Converts A string to an integer.
//! `----
@@ -1,11 +1,13 @@
//// [1.0lib-noErrors.ts]
//!
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode
//! ,-[27:1]
//! ,-[26:3]
//! 26 | * Evaluates JavaScript code and executes it.
//! 27 | * @param x A String value that contains valid JavaScript code.
//! 28 | */
//! 29 | declare function eval(x: string): any;
//! : ^^^^
//! 30 |
//! 31 | /**
//! 32 | * Converts A string to an integer.
//! `----
3 changes: 2 additions & 1 deletion crates/swc/tests/tsc-references/ES5For-of20.1.normal.js
@@ -1,7 +1,8 @@
//// [ES5For-of20.ts]
//!
//! x 'const' declarations must be initialized
//! ,-[2:1]
//! ,-[1:1]
//! 1 | for (let v of []) {
//! 2 | let v;
//! 3 | for (let v of [v]) {
//! 4 | const v;
Expand Down
3 changes: 2 additions & 1 deletion crates/swc/tests/tsc-references/ES5For-of20.2.minified.js
@@ -1,7 +1,8 @@
//// [ES5For-of20.ts]
//!
//! x 'const' declarations must be initialized
//! ,-[2:1]
//! ,-[1:1]
//! 1 | for (let v of []) {
//! 2 | let v;
//! 3 | for (let v of [v]) {
//! 4 | const v;
Expand Down
Expand Up @@ -7,4 +7,5 @@
//! : ^^^^^
//! 2 | function* foo() {
//! 3 | yield(foo);
//! 4 | }
//! `----
Expand Up @@ -7,4 +7,5 @@
//! : ^^^^^
//! 2 | function* foo() {
//! 3 | yield(foo);
//! 4 | }
//! `----
15 changes: 11 additions & 4 deletions crates/swc/tests/tsc-references/accessorWithES3.1.normal.js
@@ -1,17 +1,20 @@
//// [accessorWithES3.ts]
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[3:1]
//! ,-[2:1]
//! 2 | // error to use accessors in ES3 mode
//! 3 |
//! 4 | class C {
//! 5 | get x() {
//! : ^
//! 6 | return 1;
//! 7 | }
//! 8 | }
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[9:1]
//! ,-[8:1]
//! 8 | }
//! 9 |
//! 10 | class D {
//! 11 | set x(v) {
Expand All @@ -21,16 +24,20 @@
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[14:1]
//! ,-[13:1]
//! 13 | }
//! 14 |
//! 15 | var x = {
//! 16 | get a() { return 1 }
//! : ^
//! 17 | }
//! 18 |
//! 19 | var y = {
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[18:1]
//! ,-[17:1]
//! 17 | }
//! 18 |
//! 19 | var y = {
//! 20 | set b(v) { }
Expand Down
15 changes: 11 additions & 4 deletions crates/swc/tests/tsc-references/accessorWithES3.2.minified.js
@@ -1,17 +1,20 @@
//// [accessorWithES3.ts]
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[3:1]
//! ,-[2:1]
//! 2 | // error to use accessors in ES3 mode
//! 3 |
//! 4 | class C {
//! 5 | get x() {
//! : ^
//! 6 | return 1;
//! 7 | }
//! 8 | }
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[9:1]
//! ,-[8:1]
//! 8 | }
//! 9 |
//! 10 | class D {
//! 11 | set x(v) {
Expand All @@ -21,16 +24,20 @@
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[14:1]
//! ,-[13:1]
//! 13 | }
//! 14 |
//! 15 | var x = {
//! 16 | get a() { return 1 }
//! : ^
//! 17 | }
//! 18 |
//! 19 | var y = {
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[18:1]
//! ,-[17:1]
//! 17 | }
//! 18 |
//! 19 | var y = {
//! 20 | set b(v) { }
Expand Down
Expand Up @@ -7,4 +7,5 @@
//! : ^^^^^^^^^^^^^^^^^^
//! 3 | }
//! 4 | class B extends A {
//! 5 | get p() { return 'oh no' } // error
//! `----
Expand Up @@ -7,4 +7,5 @@
//! : ^^^^^^^^^^^^^^^^^^
//! 3 | }
//! 4 | class B extends A {
//! 5 | get p() { return 'oh no' } // error
//! `----
Expand Up @@ -7,58 +7,73 @@
//! 3 | static get a(): string;
//! : ^
//! 4 | static set a(value: string);
//! 5 |
//! 6 | private static get b(): string;
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[2:1]
//! ,-[1:1]
//! 1 | // ok to use accessors in ambient class in ES3
//! 2 | declare class C {
//! 3 | static get a(): string;
//! 4 | static set a(value: string);
//! : ^
//! 5 |
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[4:1]
//! ,-[3:5]
//! 3 | static get a(): string;
//! 4 | static set a(value: string);
//! 5 |
//! 6 | private static get b(): string;
//! : ^
//! 7 | private static set b(foo: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[5:1]
//! 5 |
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! : ^
//! 8 |
//! 9 | get x(): string;
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[7:1]
//! ,-[4:5]
//! 4 | static set a(value: string);
//! 5 |
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! : ^
//! 8 |
//! 9 | get x(): string;
//! 10 | set x(value: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[6:5]
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! 8 |
//! 9 | get x(): string;
//! : ^
//! 10 | set x(value: string);
//! 11 |
//! 12 | private get y(): string;
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[8:1]
//! ,-[7:5]
//! 7 | private static set b(foo: string);
//! 8 |
//! 9 | get x(): string;
//! 10 | set x(value: string);
//! : ^
//! 11 |
//! 12 | private get y(): string;
//! 13 | private set y(foo: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[10:1]
//! ,-[9:5]
//! 9 | get x(): string;
//! 10 | set x(value: string);
//! 11 |
//! 12 | private get y(): string;
Expand All @@ -68,7 +83,8 @@
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[11:1]
//! ,-[10:5]
//! 10 | set x(value: string);
//! 11 |
//! 12 | private get y(): string;
//! 13 | private set y(foo: string);
Expand Down
Expand Up @@ -7,58 +7,73 @@
//! 3 | static get a(): string;
//! : ^
//! 4 | static set a(value: string);
//! 5 |
//! 6 | private static get b(): string;
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[2:1]
//! ,-[1:1]
//! 1 | // ok to use accessors in ambient class in ES3
//! 2 | declare class C {
//! 3 | static get a(): string;
//! 4 | static set a(value: string);
//! : ^
//! 5 |
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[4:1]
//! ,-[3:5]
//! 3 | static get a(): string;
//! 4 | static set a(value: string);
//! 5 |
//! 6 | private static get b(): string;
//! : ^
//! 7 | private static set b(foo: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[5:1]
//! 5 |
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! : ^
//! 8 |
//! 9 | get x(): string;
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[7:1]
//! ,-[4:5]
//! 4 | static set a(value: string);
//! 5 |
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! : ^
//! 8 |
//! 9 | get x(): string;
//! 10 | set x(value: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[6:5]
//! 6 | private static get b(): string;
//! 7 | private static set b(foo: string);
//! 8 |
//! 9 | get x(): string;
//! : ^
//! 10 | set x(value: string);
//! 11 |
//! 12 | private get y(): string;
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[8:1]
//! ,-[7:5]
//! 7 | private static set b(foo: string);
//! 8 |
//! 9 | get x(): string;
//! 10 | set x(value: string);
//! : ^
//! 11 |
//! 12 | private get y(): string;
//! 13 | private set y(foo: string);
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[10:1]
//! ,-[9:5]
//! 9 | get x(): string;
//! 10 | set x(value: string);
//! 11 |
//! 12 | private get y(): string;
Expand All @@ -68,7 +83,8 @@
//! `----
//!
//! x jsc.target should be es5 or upper to use getter / setter
//! ,-[11:1]
//! ,-[10:5]
//! 10 | set x(value: string);
//! 11 |
//! 12 | private get y(): string;
//! 13 | private set y(foo: string);
Expand Down
Expand Up @@ -10,11 +10,12 @@
//! 2 | import imp1 = require('equ');
//! : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//! 3 |
//! 4 |
//! 5 | // Ambient external module members are always exported with or without export keyword when module lacks export assignment
//! `----
//!
//! x Import assignment cannot be used when targeting ECMAScript modules. Consider using `import * as ns from "mod"`, `import {a} from "mod"`, `import d from "mod"`, or another module format instead.
//! ,-[4:1]
//! 4 |
//! ,-[5:1]
//! 5 | // Ambient external module members are always exported with or without export keyword when module lacks export assignment
//! 6 | import imp3 = require('equ2');
//! : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Expand Up @@ -8,11 +8,12 @@
//! 2 | import imp1 = require('equ');
//! : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//! 3 |
//! 4 |
//! 5 | // Ambient external module members are always exported with or without export keyword when module lacks export assignment
//! `----
//!
//! x Import assignment cannot be used when targeting ECMAScript modules. Consider using `import * as ns from "mod"`, `import {a} from "mod"`, `import d from "mod"`, or another module format instead.
//! ,-[4:1]
//! 4 |
//! ,-[5:1]
//! 5 | // Ambient external module members are always exported with or without export keyword when module lacks export assignment
//! 6 | import imp3 = require('equ2');
//! : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion crates/swc/tests/tsc-references/ambientShorthand.1.normal.js
Expand Up @@ -2,7 +2,8 @@
//// [user.ts]
//!
//! x Import assignment cannot be used when targeting ECMAScript modules. Consider using `import * as ns from "mod"`, `import {a} from "mod"`, `import d from "mod"`, or another module format instead.
//! ,-[2:1]
//! ,-[1:1]
//! 1 | ///<reference path="declarations.d.ts"/>
//! 2 | import foo, {bar} from "jquery";
//! 3 | import * as baz from "fs";
//! 4 | import boom = require("jquery");
Expand Down

0 comments on commit 9ee9210

Please sign in to comment.