TypeScript/tests/cases/fourslash/referencesForMergedDeclarations3.ts
Andy Hanson 8515f7e2b5 Change find-all-references tests to test for groups
* Also always test for isWriteAccess and isDefinition
2017-01-31 06:59:16 -08:00

28 lines
1 KiB
TypeScript

/// <reference path='fourslash.ts'/>
// class and uninstantiated module
////class [|{| "isWriteAccess": true, "isDefinition": true |}testClass|] {
//// static staticMethod() { }
//// method() { }
////}
////
////module [|{| "isWriteAccess": true, "isDefinition": true |}testClass|] {
//// export interface Bar {
////
//// }
////}
////
////var c1: [|testClass|];
////var c2: [|testClass|].Bar;
////[|testClass|].staticMethod();
////[|testClass|].prototype.method();
////[|testClass|].bind(this);
////new [|testClass|]();
const [class0, module0, class1, module1, class2, class3, class4, class5] = test.ranges();
verify.singleReferenceGroup("class testClass\nnamespace testClass", [module0, module1]);
const classes = [class0, class1, class2, class3, class4, class5];
verify.referenceGroups(classes.slice(0, 5), [{ definition: "class testClass\nnamespace testClass", ranges: classes }]);
verify.referenceGroups(class5, [{ definition: "constructor testClass(): testClass\nnamespace testClass", ranges: classes }]);