mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
failing test
This commit is contained in:
parent
c9170b81a8
commit
a2d7b09488
33
tests/baselines/reference/es3defaultAliasIsQuoted.js
Normal file
33
tests/baselines/reference/es3defaultAliasIsQuoted.js
Normal file
@ -0,0 +1,33 @@
|
||||
//// [tests/cases/compiler/es3defaultAliasIsQuoted.ts] ////
|
||||
|
||||
//// [es3defaultAliasQuoted_file0.ts]
|
||||
|
||||
export class Foo {
|
||||
static CONSTANT = "Foo";
|
||||
}
|
||||
|
||||
export default function assert(value: boolean) {
|
||||
if (!value) throw new Error("Assertion failed!");
|
||||
}
|
||||
|
||||
//// [es3defaultAliasQuoted_file1.ts]
|
||||
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
|
||||
assert(Foo.CONSTANT === "Foo");
|
||||
|
||||
//// [es3defaultAliasQuoted_file0.js]
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
Foo.CONSTANT = "Foo";
|
||||
return Foo;
|
||||
})();
|
||||
exports.Foo = Foo;
|
||||
function assert(value) {
|
||||
if (!value)
|
||||
throw new Error("Assertion failed!");
|
||||
}
|
||||
exports.__esModule = true;
|
||||
exports["default"] = assert;
|
||||
//// [es3defaultAliasQuoted_file1.js]
|
||||
var es3defaultAliasQuoted_file0_1 = require("./es3defaultAliasQuoted_file0");
|
||||
es3defaultAliasQuoted_file0_1["default"](es3defaultAliasQuoted_file0_1.Foo.CONSTANT === "Foo");
|
||||
30
tests/baselines/reference/es3defaultAliasIsQuoted.symbols
Normal file
30
tests/baselines/reference/es3defaultAliasIsQuoted.symbols
Normal file
@ -0,0 +1,30 @@
|
||||
=== tests/cases/compiler/es3defaultAliasQuoted_file0.ts ===
|
||||
|
||||
export class Foo {
|
||||
>Foo : Symbol(Foo, Decl(es3defaultAliasQuoted_file0.ts, 0, 0))
|
||||
|
||||
static CONSTANT = "Foo";
|
||||
>CONSTANT : Symbol(Foo.CONSTANT, Decl(es3defaultAliasQuoted_file0.ts, 1, 18))
|
||||
}
|
||||
|
||||
export default function assert(value: boolean) {
|
||||
>assert : Symbol(assert, Decl(es3defaultAliasQuoted_file0.ts, 3, 1))
|
||||
>value : Symbol(value, Decl(es3defaultAliasQuoted_file0.ts, 5, 31))
|
||||
|
||||
if (!value) throw new Error("Assertion failed!");
|
||||
>value : Symbol(value, Decl(es3defaultAliasQuoted_file0.ts, 5, 31))
|
||||
>Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11))
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/es3defaultAliasQuoted_file1.ts ===
|
||||
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
|
||||
>Foo : Symbol(Foo, Decl(es3defaultAliasQuoted_file1.ts, 0, 8))
|
||||
>default : Symbol(assert, Decl(es3defaultAliasQuoted_file1.ts, 0, 12))
|
||||
>assert : Symbol(assert, Decl(es3defaultAliasQuoted_file1.ts, 0, 12))
|
||||
|
||||
assert(Foo.CONSTANT === "Foo");
|
||||
>assert : Symbol(assert, Decl(es3defaultAliasQuoted_file1.ts, 0, 12))
|
||||
>Foo.CONSTANT : Symbol(Foo.CONSTANT, Decl(es3defaultAliasQuoted_file0.ts, 1, 18))
|
||||
>Foo : Symbol(Foo, Decl(es3defaultAliasQuoted_file1.ts, 0, 8))
|
||||
>CONSTANT : Symbol(Foo.CONSTANT, Decl(es3defaultAliasQuoted_file0.ts, 1, 18))
|
||||
|
||||
37
tests/baselines/reference/es3defaultAliasIsQuoted.types
Normal file
37
tests/baselines/reference/es3defaultAliasIsQuoted.types
Normal file
@ -0,0 +1,37 @@
|
||||
=== tests/cases/compiler/es3defaultAliasQuoted_file0.ts ===
|
||||
|
||||
export class Foo {
|
||||
>Foo : Foo
|
||||
|
||||
static CONSTANT = "Foo";
|
||||
>CONSTANT : string
|
||||
>"Foo" : string
|
||||
}
|
||||
|
||||
export default function assert(value: boolean) {
|
||||
>assert : (value: boolean) => void
|
||||
>value : boolean
|
||||
|
||||
if (!value) throw new Error("Assertion failed!");
|
||||
>!value : boolean
|
||||
>value : boolean
|
||||
>new Error("Assertion failed!") : Error
|
||||
>Error : ErrorConstructor
|
||||
>"Assertion failed!" : string
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/es3defaultAliasQuoted_file1.ts ===
|
||||
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
|
||||
>Foo : typeof Foo
|
||||
>default : (value: boolean) => void
|
||||
>assert : (value: boolean) => void
|
||||
|
||||
assert(Foo.CONSTANT === "Foo");
|
||||
>assert(Foo.CONSTANT === "Foo") : void
|
||||
>assert : (value: boolean) => void
|
||||
>Foo.CONSTANT === "Foo" : boolean
|
||||
>Foo.CONSTANT : string
|
||||
>Foo : typeof Foo
|
||||
>CONSTANT : string
|
||||
>"Foo" : string
|
||||
|
||||
15
tests/cases/compiler/es3defaultAliasIsQuoted.ts
Normal file
15
tests/cases/compiler/es3defaultAliasIsQuoted.ts
Normal file
@ -0,0 +1,15 @@
|
||||
// @module: commonjs
|
||||
// @target: es3
|
||||
|
||||
// @Filename: es3defaultAliasQuoted_file0.ts
|
||||
export class Foo {
|
||||
static CONSTANT = "Foo";
|
||||
}
|
||||
|
||||
export default function assert(value: boolean) {
|
||||
if (!value) throw new Error("Assertion failed!");
|
||||
}
|
||||
|
||||
// @Filename: es3defaultAliasQuoted_file1.ts
|
||||
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
|
||||
assert(Foo.CONSTANT === "Foo");
|
||||
Loading…
x
Reference in New Issue
Block a user