Clean up redundant tests

This commit is contained in:
Yui T 2015-03-12 16:02:43 -07:00
parent 0672923323
commit 800c523f4f
13 changed files with 55 additions and 127 deletions

View file

@ -1,4 +1,4 @@
//// [emitClassDeclarationWithConstructorOverloadInES6.ts]
//// [emitClassDeclarationOverloadInES6.ts]
class C {
constructor(y: any)
constructor(x: number) {
@ -10,7 +10,7 @@ class D {
constructor(x: number, z="hello") {}
}
//// [emitClassDeclarationWithConstructorOverloadInES6.js]
//// [emitClassDeclarationOverloadInES6.js]
class C {
constructor(x) {
}

View file

@ -1,4 +1,4 @@
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorOverloadInES6.ts ===
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationOverloadInES6.ts ===
class C {
>C : C

View file

@ -1,22 +0,0 @@
//// [emitClassDeclarationWithMethodOverloadInES6.ts]
class D {
_bar: string;
foo(a: any);
foo() { }
baz(...args): string;
baz(z:string, v: number): string {
return this._bar;
}
}
//// [emitClassDeclarationWithMethodOverloadInES6.js]
class D {
constructor() {
}
foo() {
}
baz(z, v) {
return this._bar;
}
}

View file

@ -1,29 +0,0 @@
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodOverloadInES6.ts ===
class D {
>D : D
_bar: string;
>_bar : string
foo(a: any);
>foo : (a: any) => any
>a : any
foo() { }
>foo : (a: any) => any
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 : D
>_bar : string
}
}

View file

@ -1,20 +0,0 @@
//// [emitClassDeclarationWithRestAndDefaultArguements.ts]
class B {
constructor(y = 10, ...p) { }
foo(a = "hi") { }
bar(b = 10, ...p) { }
far(...p)
far(a: any) { }
}
//// [emitClassDeclarationWithRestAndDefaultArguements.js]
class B {
constructor(y = 10, ...p) {
}
foo(a = "hi") {
}
bar(b = 10, ...p) {
}
far(a) {
}
}

View file

@ -1,25 +0,0 @@
=== tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithRestAndDefaultArguements.ts ===
class B {
>B : B
constructor(y = 10, ...p) { }
>y : number
>p : any[]
foo(a = "hi") { }
>foo : (a?: string) => void
>a : string
bar(b = 10, ...p) { }
>bar : (b?: number, ...p: any[]) => void
>b : number
>p : any[]
far(...p)
>far : (...p: any[]) => any
>p : any[]
far(a: any) { }
>far : (...p: any[]) => any
>a : any
}

View file

@ -1,14 +1,24 @@
// @target: es6
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;
}
}

View file

@ -1,8 +1,8 @@
// @target: es6
export class C {
foo() { }
foo(y: string, ...args: any) { }
}
export default class D {
bar() { }
bar(k = 10) {}
}

View file

@ -1,8 +1,23 @@
// @target: es6
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);
}
}

View file

@ -1,11 +0,0 @@
// @target:es6
class D {
_bar: string;
foo(a: any);
foo() { }
baz(...args): string;
baz(z:string, v: number): string {
return this._bar;
}
}

View file

@ -1,8 +0,0 @@
// @target: es6
class B {
constructor(y = 10, ...p) { }
foo(a = "hi") { }
bar(b = 10, ...p) { }
far(...p)
far(a: any) { }
}

View file

@ -0,0 +1,18 @@
// @target: es6
class B {
x = 10;
constructor() {
this.x = 10;
}
foo() {
console.log(this.x);
}
get X() {
return this.x;
}
set bX(y: number) {
this.x = y;
}
}