TypeScript/tests/baselines/reference/literals.symbols
Wesley Wigham 5353475fce Always collect type and symbol baselines (#18621)
* Always generate type & symbol baselines

* Accept changed shadowed baselines

* Accept brand new type and symbol baselines

* Allow `getTypeAtLocation` to return undefined in the type writer

* Accept baselines which had missing type information

* Bind container for dynamically names enum members so they may be printed

* Accept type/symbol baselines for enums with computed members

* First pass at reducing typeWriter memory overhead

* Use generators to allow for type and symbol baselines with no cache

* Accept new baselines for tests whose output was fixed by better newline splitting

* Hard cap on number of declarations printed, cache declaration print text

* handle differing newlines better still to handle RWC newlines

* Lower abridging count, accept abridged baselines

* Limit max RWC error output size, limit RWC type and symbol baseline input size

* Move skip logic into type and symbol baseliner to streamline error handling

* Accept removal of empty baselines

* Canonicalize path earlier to handle odd paths in input files

* Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another

* No need to pathify again
2017-09-22 15:52:04 -07:00

87 lines
3.9 KiB
Plaintext

=== tests/cases/conformance/expressions/literals/literals.ts ===
//typeof null is Null
//typeof true is Boolean
//typeof false is Boolean
//typeof numeric literal is Number
//typeof string literal is String
//typeof regex literal is Regex
var nu = null / null;
>nu : Symbol(nu, Decl(literals.ts, 7, 3))
var u = undefined / undefined;
>u : Symbol(u, Decl(literals.ts, 8, 3))
>undefined : Symbol(undefined)
>undefined : Symbol(undefined)
var b: boolean;
>b : Symbol(b, Decl(literals.ts, 10, 3), Decl(literals.ts, 11, 3), Decl(literals.ts, 12, 3))
var b = true;
>b : Symbol(b, Decl(literals.ts, 10, 3), Decl(literals.ts, 11, 3), Decl(literals.ts, 12, 3))
var b = false;
>b : Symbol(b, Decl(literals.ts, 10, 3), Decl(literals.ts, 11, 3), Decl(literals.ts, 12, 3))
var n: number;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = 1;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = 1.0;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = 1e4;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = 001; // Error in ES5
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = 0x1;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = -1;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = -1.0;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = -1e-4;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = -003; // Error in ES5
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var n = -0x1;
>n : Symbol(n, Decl(literals.ts, 14, 3), Decl(literals.ts, 15, 3), Decl(literals.ts, 16, 3), Decl(literals.ts, 17, 3), Decl(literals.ts, 18, 3) ... and 6 more)
var s: string;
>s : Symbol(s, Decl(literals.ts, 26, 3), Decl(literals.ts, 27, 3), Decl(literals.ts, 28, 3), Decl(literals.ts, 29, 3), Decl(literals.ts, 31, 3))
var s = '';
>s : Symbol(s, Decl(literals.ts, 26, 3), Decl(literals.ts, 27, 3), Decl(literals.ts, 28, 3), Decl(literals.ts, 29, 3), Decl(literals.ts, 31, 3))
var s = "";
>s : Symbol(s, Decl(literals.ts, 26, 3), Decl(literals.ts, 27, 3), Decl(literals.ts, 28, 3), Decl(literals.ts, 29, 3), Decl(literals.ts, 31, 3))
var s = 'foo\
>s : Symbol(s, Decl(literals.ts, 26, 3), Decl(literals.ts, 27, 3), Decl(literals.ts, 28, 3), Decl(literals.ts, 29, 3), Decl(literals.ts, 31, 3))
bar';
var s = "foo\
>s : Symbol(s, Decl(literals.ts, 26, 3), Decl(literals.ts, 27, 3), Decl(literals.ts, 28, 3), Decl(literals.ts, 29, 3), Decl(literals.ts, 31, 3))
bar";
var r: RegExp;
>r : Symbol(r, Decl(literals.ts, 34, 3), Decl(literals.ts, 35, 3), Decl(literals.ts, 36, 3))
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
var r = /what/;
>r : Symbol(r, Decl(literals.ts, 34, 3), Decl(literals.ts, 35, 3), Decl(literals.ts, 36, 3))
var r = /\\\\/;
>r : Symbol(r, Decl(literals.ts, 34, 3), Decl(literals.ts, 35, 3), Decl(literals.ts, 36, 3))