Update test name

This commit is contained in:
Mohamed Hegazy 2016-11-29 12:29:40 -08:00
parent 9ab55c1576
commit e4f0a50a7c
6 changed files with 40 additions and 87 deletions

View File

@ -1,17 +1,11 @@
//// [restIntersectionOrIntersection.ts]
//// [restIntersection.ts]
var intersection: { x: number, y: number } & { w: string, z: string };
var union: { a: number, c: boolean } | { a: string, b: string };
var rest1: { y: number, w: string, z: string };
var {x, ...rest1 } = intersection;
var rest2: { c: boolean } | { b: string };
var {a, ...rest2 } = union;
//// [restIntersectionOrIntersection.js]
//// [restIntersection.js]
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@ -22,8 +16,5 @@ var __rest = (this && this.__rest) || function (s, e) {
return t;
};
var intersection;
var union;
var rest1;
var x = intersection.x, rest1 = __rest(intersection, ["x"]);
var rest2;
var a = union.a, rest2 = __rest(union, ["a"]);

View File

@ -0,0 +1,19 @@
=== tests/cases/compiler/restIntersection.ts ===
var intersection: { x: number, y: number } & { w: string, z: string };
>intersection : Symbol(intersection, Decl(restIntersection.ts, 0, 3))
>x : Symbol(x, Decl(restIntersection.ts, 0, 19))
>y : Symbol(y, Decl(restIntersection.ts, 0, 30))
>w : Symbol(w, Decl(restIntersection.ts, 0, 46))
>z : Symbol(z, Decl(restIntersection.ts, 0, 57))
var rest1: { y: number, w: string, z: string };
>rest1 : Symbol(rest1, Decl(restIntersection.ts, 2, 3), Decl(restIntersection.ts, 3, 7))
>y : Symbol(y, Decl(restIntersection.ts, 2, 12))
>w : Symbol(w, Decl(restIntersection.ts, 2, 23))
>z : Symbol(z, Decl(restIntersection.ts, 2, 34))
var {x, ...rest1 } = intersection;
>x : Symbol(x, Decl(restIntersection.ts, 3, 5))
>rest1 : Symbol(rest1, Decl(restIntersection.ts, 2, 3), Decl(restIntersection.ts, 3, 7))
>intersection : Symbol(intersection, Decl(restIntersection.ts, 0, 3))

View File

@ -0,0 +1,19 @@
=== tests/cases/compiler/restIntersection.ts ===
var intersection: { x: number, y: number } & { w: string, z: string };
>intersection : { x: number; y: number; } & { w: string; z: string; }
>x : number
>y : number
>w : string
>z : string
var rest1: { y: number, w: string, z: string };
>rest1 : { y: number; w: string; z: string; }
>y : number
>w : string
>z : string
var {x, ...rest1 } = intersection;
>x : number
>rest1 : { y: number; w: string; z: string; }
>intersection : { x: number; y: number; } & { w: string; z: string; }

View File

@ -1,38 +0,0 @@
=== tests/cases/compiler/restIntersectionOrIntersection.ts ===
var intersection: { x: number, y: number } & { w: string, z: string };
>intersection : Symbol(intersection, Decl(restIntersectionOrIntersection.ts, 0, 3))
>x : Symbol(x, Decl(restIntersectionOrIntersection.ts, 0, 19))
>y : Symbol(y, Decl(restIntersectionOrIntersection.ts, 0, 30))
>w : Symbol(w, Decl(restIntersectionOrIntersection.ts, 0, 46))
>z : Symbol(z, Decl(restIntersectionOrIntersection.ts, 0, 57))
var union: { a: number, c: boolean } | { a: string, b: string };
>union : Symbol(union, Decl(restIntersectionOrIntersection.ts, 1, 3))
>a : Symbol(a, Decl(restIntersectionOrIntersection.ts, 1, 12))
>c : Symbol(c, Decl(restIntersectionOrIntersection.ts, 1, 23))
>a : Symbol(a, Decl(restIntersectionOrIntersection.ts, 1, 40))
>b : Symbol(b, Decl(restIntersectionOrIntersection.ts, 1, 51))
var rest1: { y: number, w: string, z: string };
>rest1 : Symbol(rest1, Decl(restIntersectionOrIntersection.ts, 4, 3), Decl(restIntersectionOrIntersection.ts, 5, 7))
>y : Symbol(y, Decl(restIntersectionOrIntersection.ts, 4, 12))
>w : Symbol(w, Decl(restIntersectionOrIntersection.ts, 4, 23))
>z : Symbol(z, Decl(restIntersectionOrIntersection.ts, 4, 34))
var {x, ...rest1 } = intersection;
>x : Symbol(x, Decl(restIntersectionOrIntersection.ts, 5, 5))
>rest1 : Symbol(rest1, Decl(restIntersectionOrIntersection.ts, 4, 3), Decl(restIntersectionOrIntersection.ts, 5, 7))
>intersection : Symbol(intersection, Decl(restIntersectionOrIntersection.ts, 0, 3))
var rest2: { c: boolean } | { b: string };
>rest2 : Symbol(rest2, Decl(restIntersectionOrIntersection.ts, 7, 3), Decl(restIntersectionOrIntersection.ts, 8, 7))
>c : Symbol(c, Decl(restIntersectionOrIntersection.ts, 7, 12))
>b : Symbol(b, Decl(restIntersectionOrIntersection.ts, 7, 29))
var {a, ...rest2 } = union;
>a : Symbol(a, Decl(restIntersectionOrIntersection.ts, 8, 5))
>rest2 : Symbol(rest2, Decl(restIntersectionOrIntersection.ts, 7, 3), Decl(restIntersectionOrIntersection.ts, 8, 7))
>union : Symbol(union, Decl(restIntersectionOrIntersection.ts, 1, 3))

View File

@ -1,38 +0,0 @@
=== tests/cases/compiler/restIntersectionOrIntersection.ts ===
var intersection: { x: number, y: number } & { w: string, z: string };
>intersection : { x: number; y: number; } & { w: string; z: string; }
>x : number
>y : number
>w : string
>z : string
var union: { a: number, c: boolean } | { a: string, b: string };
>union : { a: number; c: boolean; } | { a: string; b: string; }
>a : number
>c : boolean
>a : string
>b : string
var rest1: { y: number, w: string, z: string };
>rest1 : { y: number; w: string; z: string; }
>y : number
>w : string
>z : string
var {x, ...rest1 } = intersection;
>x : number
>rest1 : { y: number; w: string; z: string; }
>intersection : { x: number; y: number; } & { w: string; z: string; }
var rest2: { c: boolean } | { b: string };
>rest2 : { c: boolean; } | { b: string; }
>c : boolean
>b : string
var {a, ...rest2 } = union;
>a : string | number
>rest2 : { c: boolean; } | { b: string; }
>union : { a: number; c: boolean; } | { a: string; b: string; }