From e4f0a50a7cf9f212d7102756e336472af89d2fa7 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 29 Nov 2016 12:29:40 -0800 Subject: [PATCH] Update test name --- ...nOrIntersection.js => restIntersection.js} | 13 +------ .../reference/restIntersection.symbols | 19 ++++++++++ .../reference/restIntersection.types | 19 ++++++++++ .../restIntersectionOrIntersection.symbols | 38 ------------------- .../restIntersectionOrIntersection.types | 38 ------------------- ...nOrIntersection.ts => restIntersection.ts} | 0 6 files changed, 40 insertions(+), 87 deletions(-) rename tests/baselines/reference/{restIntersectionOrIntersection.js => restIntersection.js} (67%) create mode 100644 tests/baselines/reference/restIntersection.symbols create mode 100644 tests/baselines/reference/restIntersection.types delete mode 100644 tests/baselines/reference/restIntersectionOrIntersection.symbols delete mode 100644 tests/baselines/reference/restIntersectionOrIntersection.types rename tests/cases/compiler/{restIntersectionOrIntersection.ts => restIntersection.ts} (100%) diff --git a/tests/baselines/reference/restIntersectionOrIntersection.js b/tests/baselines/reference/restIntersection.js similarity index 67% rename from tests/baselines/reference/restIntersectionOrIntersection.js rename to tests/baselines/reference/restIntersection.js index 0697e579ecd..d1f9aa3094c 100644 --- a/tests/baselines/reference/restIntersectionOrIntersection.js +++ b/tests/baselines/reference/restIntersection.js @@ -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"]); diff --git a/tests/baselines/reference/restIntersection.symbols b/tests/baselines/reference/restIntersection.symbols new file mode 100644 index 00000000000..75f91d243e2 --- /dev/null +++ b/tests/baselines/reference/restIntersection.symbols @@ -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)) + diff --git a/tests/baselines/reference/restIntersection.types b/tests/baselines/reference/restIntersection.types new file mode 100644 index 00000000000..5779349ba29 --- /dev/null +++ b/tests/baselines/reference/restIntersection.types @@ -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; } + diff --git a/tests/baselines/reference/restIntersectionOrIntersection.symbols b/tests/baselines/reference/restIntersectionOrIntersection.symbols deleted file mode 100644 index f2eb4f16014..00000000000 --- a/tests/baselines/reference/restIntersectionOrIntersection.symbols +++ /dev/null @@ -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)) - - diff --git a/tests/baselines/reference/restIntersectionOrIntersection.types b/tests/baselines/reference/restIntersectionOrIntersection.types deleted file mode 100644 index c87769ff3cc..00000000000 --- a/tests/baselines/reference/restIntersectionOrIntersection.types +++ /dev/null @@ -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; } - - diff --git a/tests/cases/compiler/restIntersectionOrIntersection.ts b/tests/cases/compiler/restIntersection.ts similarity index 100% rename from tests/cases/compiler/restIntersectionOrIntersection.ts rename to tests/cases/compiler/restIntersection.ts