Update baselines

This commit is contained in:
Yui T
2015-03-15 21:40:15 -07:00
parent 3bb4b50b4f
commit 0eeb7ce7b8
16 changed files with 183 additions and 134 deletions

View File

@@ -1,26 +1,42 @@
//// [emitClassDeclarationWithConstructorInES6.ts]
class C {
class A {
y: number;
constructor(x: number) {
}
foo(a: any);
foo() { }
}
class D {
class B {
y: number;
x: string = "hello";
constructor(x: number, z = "hello") {
_bar: string;
constructor(x: number, z = "hello", ...args) {
this.y = 10;
}
}
baz(...args): string;
baz(z: string, v: number): string {
return this._bar;
}
}
//// [emitClassDeclarationWithConstructorInES6.js]
class C {
class A {
constructor(x) {
}
foo() {
}
}
class D {
constructor(x, z = "hello") {
class B {
constructor(x, z = "hello", ...args) {
this.x = "hello";
this.y = 10;
}
baz(z, v) {
return this._bar;
}
}

View File

@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts ===
class C {
>C : C
class A {
>A : A
y: number;
>y : number
@@ -8,10 +8,16 @@ class C {
constructor(x: number) {
>x : number
}
foo(a: any);
>foo : (a: any) => any
>a : any
foo() { }
>foo : (a: any) => any
}
class D {
>D : D
class B {
>B : B
y: number;
>y : number
@@ -19,14 +25,35 @@ class D {
x: string = "hello";
>x : string
constructor(x: number, z = "hello") {
_bar: string;
>_bar : string
constructor(x: number, z = "hello", ...args) {
>x : number
>z : string
>args : any[]
this.y = 10;
>this.y = 10 : number
>this.y : number
>this : D
>this : B
>y : number
}
baz(...args): string;
>baz : (...args: any[]) => string
>args : any[]
baz(z: string, v: number): string {
>baz : (...args: any[]) => string
>z : string
>v : number
return this._bar;
>this._bar : string
>this : B
>_bar : string
}
}

View File

@@ -16,9 +16,6 @@ class B {
}
}
class C extends B {
constructor(...args) {
super(...args);
}
}
class D extends B {
constructor(b) {

View File

@@ -1,25 +1,48 @@
//// [emitClassDeclarationWithExtensionInES6.ts]
class B { }
class C extends B { }
class D extends B {
class B {
baz(a: string, y = 10) { }
}
class C extends B {
foo() { }
baz(a: string, y:number) {
super.baz(a, y);
}
}
class D extends C {
constructor() {
super();
}
foo() {
super.foo();
}
baz() {
super.baz("hello", 10);
}
}
//// [emitClassDeclarationWithExtensionInES6.js]
class B {
constructor() {
baz(a, y = 10) {
}
}
class C extends B {
constructor(...args) {
super(...args);
foo() {
}
baz(a, y) {
super.baz(a, y);
}
}
class D extends B {
class D extends C {
constructor() {
super();
}
foo() {
super.foo();
}
baz() {
super.baz("hello", 10);
}
}

View File

@@ -1,19 +1,61 @@
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionInES6.ts ===
class B { }
class B {
>B : B
class C extends B { }
baz(a: string, y = 10) { }
>baz : (a: string, y?: number) => void
>a : string
>y : number
}
class C extends B {
>C : C
>B : B
class D extends B {
foo() { }
>foo : () => void
baz(a: string, y:number) {
>baz : (a: string, y: number) => void
>a : string
>y : number
super.baz(a, y);
>super.baz(a, y) : void
>super.baz : (a: string, y?: number) => void
>super : B
>baz : (a: string, y?: number) => void
>a : string
>y : number
}
}
class D extends C {
>D : D
>B : B
>C : C
constructor() {
super();
>super() : void
>super : typeof B
>super : typeof C
}
foo() {
>foo : () => void
super.foo();
>super.foo() : void
>super.foo : () => void
>super : C
>foo : () => void
}
baz() {
>baz : () => void
super.baz("hello", 10);
>super.baz("hello", 10) : void
>super.baz : (a: string, y: number) => void
>super : C
>baz : (a: string, y: number) => void
}
}

View File

@@ -18,8 +18,6 @@ class C {
//// [emitClassDeclarationWithGetterSetterInES6.js]
class C {
constructor() {
}
get name() {
return this._name;
}

View File

@@ -24,8 +24,6 @@ class D {
//// [emitClassDeclarationWithMethodInES6.js]
class D {
constructor() {
}
foo() {
}
["computedName"]() {

View File

@@ -4,11 +4,8 @@ class C {
}
//// [symbolDeclarationEmit1.js]
var C = (function () {
function C() {
}
return C;
})();
class C {
}
//// [symbolDeclarationEmit1.d.ts]

View File

@@ -7,23 +7,18 @@ class C {
}
//// [symbolDeclarationEmit11.js]
var C = (function () {
function C() {
class C {
constructor() {
}
C[Symbol.toPrimitive] = function () {
};
Object.defineProperty(C, Symbol.isRegExp, {
get: function () {
return "";
},
set: function (x) {
},
enumerable: true,
configurable: true
});
C[Symbol.iterator] = 0;
return C;
})();
static [Symbol.toPrimitive]() {
}
static get [Symbol.isRegExp]() {
return "";
}
static set [Symbol.isRegExp](x) {
}
}
C[Symbol.iterator] = 0;
//// [symbolDeclarationEmit11.d.ts]

View File

@@ -15,24 +15,16 @@ module M {
//// [symbolDeclarationEmit12.js]
var M;
(function (M) {
var C = (function () {
function C() {
export class C {
[Symbol.toPrimitive](x) {
}
C.prototype[Symbol.toPrimitive] = function (x) {
};
C.prototype[Symbol.isConcatSpreadable] = function () {
[Symbol.isConcatSpreadable]() {
return undefined;
};
Object.defineProperty(C.prototype, Symbol.isRegExp, {
get: function () {
return undefined;
},
set: function (x) {
},
enumerable: true,
configurable: true
});
return C;
})();
M.C = C;
}
get [Symbol.isRegExp]() {
return undefined;
}
set [Symbol.isRegExp](x) {
}
}
})(M || (M = {}));

View File

@@ -5,24 +5,13 @@ class C {
}
//// [symbolDeclarationEmit13.js]
var C = (function () {
function C() {
class C {
get [Symbol.isRegExp]() {
return "";
}
Object.defineProperty(C.prototype, Symbol.isRegExp, {
get: function () {
return "";
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, Symbol.toStringTag, {
set: function (x) {
},
enumerable: true,
configurable: true
});
return C;
})();
set [Symbol.toStringTag](x) {
}
}
//// [symbolDeclarationEmit13.d.ts]

View File

@@ -5,25 +5,14 @@ class C {
}
//// [symbolDeclarationEmit14.js]
var C = (function () {
function C() {
class C {
get [Symbol.isRegExp]() {
return "";
}
Object.defineProperty(C.prototype, Symbol.isRegExp, {
get: function () {
return "";
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, Symbol.toStringTag, {
get: function () {
return "";
},
enumerable: true,
configurable: true
});
return C;
})();
get [Symbol.toStringTag]() {
return "";
}
}
//// [symbolDeclarationEmit14.d.ts]

View File

@@ -4,12 +4,11 @@ class C {
}
//// [symbolDeclarationEmit2.js]
var C = (function () {
function C() {
class C {
constructor() {
this[Symbol.isRegExp] = "";
}
return C;
})();
}
//// [symbolDeclarationEmit2.d.ts]

View File

@@ -6,13 +6,10 @@ class C {
}
//// [symbolDeclarationEmit3.js]
var C = (function () {
function C() {
class C {
[Symbol.isRegExp](x) {
}
C.prototype[Symbol.isRegExp] = function (x) {
};
return C;
})();
}
//// [symbolDeclarationEmit3.d.ts]

View File

@@ -5,20 +5,13 @@ class C {
}
//// [symbolDeclarationEmit4.js]
var C = (function () {
function C() {
class C {
get [Symbol.isRegExp]() {
return "";
}
Object.defineProperty(C.prototype, Symbol.isRegExp, {
get: function () {
return "";
},
set: function (x) {
},
enumerable: true,
configurable: true
});
return C;
})();
set [Symbol.isRegExp](x) {
}
}
//// [symbolDeclarationEmit4.d.ts]

View File

@@ -11,11 +11,8 @@ f({}, 10, 10);
f `abcdef${ 1234 }${ 5678 }ghijkl`;
//// [templateStringsArrayTypeRedefinedInES6Mode.js]
var TemplateStringsArray = (function () {
function TemplateStringsArray() {
}
return TemplateStringsArray;
})();
class TemplateStringsArray {
}
function f(x, y, z) {
}
f({}, 10, 10);