Add Failing Tests

This commit is contained in:
Arthur Ozga 2016-10-28 11:57:30 -07:00
parent 72728337e0
commit 834245cd8f
6 changed files with 131 additions and 0 deletions

View File

@ -0,0 +1,13 @@
/// <reference path='fourslash.ts' />
//// abstract class A {
//// abstract f();
//// }
////
//// class C extends A {[|
//// |]}
verify.codeFixAtPosition(`f(){
throw new Error('Method not Implemented');
}
`);

View File

@ -0,0 +1,11 @@
/// <reference path='fourslash.ts' />
//// abstract class A {
//// protected abstract x: number;
//// }
////
//// class C extends A {[|
//// |]}
verify.codeFixAtPosition(`protected x: number;
`);

View File

@ -0,0 +1,11 @@
/// <reference path='fourslash.ts' />
//// abstract class A {
//// public abstract x: number;
//// }
////
//// class C extends A {[|
//// |]}
verify.codeFixAtPosition(`public x: number;
`);

View File

@ -0,0 +1,12 @@
/// <reference path='fourslash.ts' />
//// interface I {
//// f1();
//// }
////
//// class /*0*/C/*1*/ /*2*/extend/*3*/s/*4*/ /*5*/I/*6*/ {/*7*/}
for (let i = 0; i < 8; ++i) {
goTo.marker("" + i);
verify.codeFixAtPosition("");
}

View File

@ -0,0 +1,22 @@
/// <reference path='fourslash.ts' />
//// class C1 {
//// f1();
//// }
////
//// class C2 {
//// f2();
//// }
////
//// interface I1 extends C1, C2 {}
////
//// class C3 implements I1 {[|
//// |]}
verify.codeFixAtPosition(`f1(){
throw new Error('Method not Implemented');
}
f2(){
throw new Error('Method not Implemented');
}
`);

View File

@ -0,0 +1,62 @@
/// <reference path='fourslash.ts' />
//// // Referenced throughout the inheritance chain.
//// interface I0 { a: number }
////
//// class C1 implements I0 { a: number }
//// interface I1 { b: number }
//// interface I2 extends C1, I1 {}
////
//// class C2 { c: number }
//// interface I3 {d: number}
//// class C3 extends C2 implements I0, I2, I3 {
//// a: number;
//// b: number;
//// d: number;
//// }
////
//// interface I4 { e: number }
//// interface I5 { f: number }
//// class C4 extends C3 implements I0, I4, I5 {
//// e: number;
//// f: number;
//// }
////
//// interface I6 extends C4 {}
//// class C5 implements I6 {[|
//// |]}
/**
* We want to check whether the search for member to replace actually searches through
* the various possible paths of the inheritance chain correctly, and that We
* don't issue duplicates for the same member.
*
* Our class DAG:
*
* C5
* |-I6
* |-C4
* |-I4
* |-I5
* |------------------------ I0
* |-C3
* |-I2
* |-I1
* |-C1
* |-------------------I0
* |-I3
* |-----------------------I0
* |-C2
*/
verify.codeFixAtPosition(
`a: number;
b: number;
c: number;
d: number;
e: number:
f: number;
`);