Skip to content

Commit 489349e

Browse files
author
Kanchalai Tanglertsampan
committed
Add new tests and baselines
1 parent abeb2a9 commit 489349e

12 files changed

+248
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//// [test.ts]
2+
/* Detached Comment */
3+
4+
// Class Doo Comment
5+
export class Doo {}
6+
class Scooby extends Doo {}
7+
8+
//// [outFile.js]
9+
var __extends = (this && this.__extends) || (function () {
10+
var extendStatics = Object.setPrototypeOf ||
11+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
13+
return function (d, b) {
14+
extendStatics(d, b);
15+
function __() { this.constructor = d; }
16+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17+
};
18+
})();
19+
/* Detached Comment */
20+
define("test", ["require", "exports"], function (require, exports) {
21+
"use strict";
22+
Object.defineProperty(exports, "__esModule", { value: true });
23+
// Class Doo Comment
24+
var Doo = (function () {
25+
function Doo() {
26+
}
27+
return Doo;
28+
}());
29+
exports.Doo = Doo;
30+
var Scooby = (function (_super) {
31+
__extends(Scooby, _super);
32+
function Scooby() {
33+
return _super !== null && _super.apply(this, arguments) || this;
34+
}
35+
return Scooby;
36+
}(Doo));
37+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
=== tests/cases/compiler/test.ts ===
2+
/* Detached Comment */
3+
4+
// Class Doo Comment
5+
export class Doo {}
6+
>Doo : Symbol(Doo, Decl(test.ts, 0, 0))
7+
8+
class Scooby extends Doo {}
9+
>Scooby : Symbol(Scooby, Decl(test.ts, 3, 19))
10+
>Doo : Symbol(Doo, Decl(test.ts, 0, 0))
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
=== tests/cases/compiler/test.ts ===
2+
/* Detached Comment */
3+
4+
// Class Doo Comment
5+
export class Doo {}
6+
>Doo : Doo
7+
8+
class Scooby extends Doo {}
9+
>Scooby : Scooby
10+
>Doo : Doo
11+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//// [test.ts]
2+
#!/usr/bin/env gjs
3+
"use strict"
4+
class Doo {}
5+
class Scooby extends Doo {}
6+
7+
//// [outFile.js]
8+
#!/usr/bin/env gjs
9+
"use strict";
10+
var __extends = (this && this.__extends) || (function () {
11+
var extendStatics = Object.setPrototypeOf ||
12+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14+
return function (d, b) {
15+
extendStatics(d, b);
16+
function __() { this.constructor = d; }
17+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18+
};
19+
})();
20+
var Doo = (function () {
21+
function Doo() {
22+
}
23+
return Doo;
24+
}());
25+
var Scooby = (function (_super) {
26+
__extends(Scooby, _super);
27+
function Scooby() {
28+
return _super !== null && _super.apply(this, arguments) || this;
29+
}
30+
return Scooby;
31+
}(Doo));
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=== tests/cases/compiler/test.ts ===
2+
#!/usr/bin/env gjs
3+
"use strict"
4+
class Doo {}
5+
>Doo : Symbol(Doo, Decl(test.ts, 1, 12))
6+
7+
class Scooby extends Doo {}
8+
>Scooby : Symbol(Scooby, Decl(test.ts, 2, 12))
9+
>Doo : Symbol(Doo, Decl(test.ts, 1, 12))
10+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
=== tests/cases/compiler/test.ts ===
2+
#!/usr/bin/env gjs
3+
"use strict"
4+
>"use strict" : "use strict"
5+
6+
class Doo {}
7+
>Doo : Doo
8+
9+
class Scooby extends Doo {}
10+
>Scooby : Scooby
11+
>Doo : Doo
12+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
//// [tests/cases/compiler/emitBundleWithShebangAndPrologueDirectives2.ts] ////
2+
3+
//// [test.ts]
4+
#!/usr/bin/env gjs
5+
"use strict"
6+
class Doo {}
7+
class Scooby extends Doo {}
8+
9+
//// [test1.ts]
10+
#!/usr/bin/env gjs
11+
"use strict"
12+
"Another prologue"
13+
class Dood {}
14+
class Scoobyd extends Dood {}
15+
16+
//// [outFile.js]
17+
#!/usr/bin/env gjs
18+
"use strict";
19+
"Another prologue";
20+
var __extends = (this && this.__extends) || (function () {
21+
var extendStatics = Object.setPrototypeOf ||
22+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24+
return function (d, b) {
25+
extendStatics(d, b);
26+
function __() { this.constructor = d; }
27+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28+
};
29+
})();
30+
var Doo = (function () {
31+
function Doo() {
32+
}
33+
return Doo;
34+
}());
35+
var Scooby = (function (_super) {
36+
__extends(Scooby, _super);
37+
function Scooby() {
38+
return _super !== null && _super.apply(this, arguments) || this;
39+
}
40+
return Scooby;
41+
}(Doo));
42+
var Dood = (function () {
43+
function Dood() {
44+
}
45+
return Dood;
46+
}());
47+
var Scoobyd = (function (_super) {
48+
__extends(Scoobyd, _super);
49+
function Scoobyd() {
50+
return _super !== null && _super.apply(this, arguments) || this;
51+
}
52+
return Scoobyd;
53+
}(Dood));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
=== tests/cases/compiler/test.ts ===
2+
#!/usr/bin/env gjs
3+
"use strict"
4+
class Doo {}
5+
>Doo : Symbol(Doo, Decl(test.ts, 1, 12))
6+
7+
class Scooby extends Doo {}
8+
>Scooby : Symbol(Scooby, Decl(test.ts, 2, 12))
9+
>Doo : Symbol(Doo, Decl(test.ts, 1, 12))
10+
11+
=== tests/cases/compiler/test1.ts ===
12+
#!/usr/bin/env gjs
13+
"use strict"
14+
"Another prologue"
15+
class Dood {}
16+
>Dood : Symbol(Dood, Decl(test1.ts, 2, 18))
17+
18+
class Scoobyd extends Dood {}
19+
>Scoobyd : Symbol(Scoobyd, Decl(test1.ts, 3, 13))
20+
>Dood : Symbol(Dood, Decl(test1.ts, 2, 18))
21+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=== tests/cases/compiler/test.ts ===
2+
#!/usr/bin/env gjs
3+
"use strict"
4+
>"use strict" : "use strict"
5+
6+
class Doo {}
7+
>Doo : Doo
8+
9+
class Scooby extends Doo {}
10+
>Scooby : Scooby
11+
>Doo : Doo
12+
13+
=== tests/cases/compiler/test1.ts ===
14+
#!/usr/bin/env gjs
15+
"use strict"
16+
>"use strict" : "use strict"
17+
18+
"Another prologue"
19+
>"Another prologue" : "Another prologue"
20+
21+
class Dood {}
22+
>Dood : Dood
23+
24+
class Scoobyd extends Dood {}
25+
>Scoobyd : Scoobyd
26+
>Dood : Dood
27+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @outFile: outFile.js
2+
// @module: amd
3+
// @target: es5
4+
5+
// @Filename: test.ts
6+
/* Detached Comment */
7+
8+
// Class Doo Comment
9+
export class Doo {}
10+
class Scooby extends Doo {}

0 commit comments

Comments
 (0)