mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Adjust tests.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function f() {
|
||||
//// return 100;
|
||||
////}
|
||||
////
|
||||
////export default [|f|];
|
||||
////
|
||||
////var x: typeof f;
|
||||
////
|
||||
////var y = f();
|
||||
////
|
||||
////namespace /**/[|f|] {
|
||||
////}
|
||||
|
||||
// The function 'f' and the namespace 'f' don't get merged,
|
||||
// but the 'export default' site, includes both meanings.
|
||||
|
||||
// Here we are testing whether the 'export default'
|
||||
// site is included in the references to the namespace.
|
||||
|
||||
goTo.marker();
|
||||
let ranges = test.ranges();
|
||||
verify.referencesCountIs(ranges.length);
|
||||
|
||||
for (let expectedReference of ranges) {
|
||||
verify.referencesAtPositionContains(expectedReference);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function /**/[|f|]() {
|
||||
//// return 100;
|
||||
////}
|
||||
////
|
||||
////export default [|f|];
|
||||
////
|
||||
////var x: typeof [|f|];
|
||||
////
|
||||
////var y = [|f|]();
|
||||
////
|
||||
////namespace f {
|
||||
////}
|
||||
|
||||
// The function 'f' and the namespace 'f' don't get merged,
|
||||
// but the 'export default' site, includes both meanings.
|
||||
|
||||
// Here we are testing whether the 'export default' site
|
||||
// and all value-uses of 'f' are included in the references to the function.
|
||||
|
||||
goTo.marker();
|
||||
let ranges = test.ranges();
|
||||
verify.referencesCountIs(ranges.length);
|
||||
|
||||
for (let expectedReference of ranges) {
|
||||
verify.referencesAtPositionContains(expectedReference);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function [|f|]() {
|
||||
//// return 100;
|
||||
////}
|
||||
////
|
||||
////export default /**/[|f|];
|
||||
////
|
||||
////var x: typeof [|f|];
|
||||
////
|
||||
////var y = [|f|]();
|
||||
////
|
||||
////namespace [|f|] {
|
||||
////}
|
||||
|
||||
// The function 'f' and the namespace 'f' don't get merged,
|
||||
// but the 'export default' site, includes both meanings.
|
||||
|
||||
// Here we are testing whether the 'export default' site
|
||||
// and all value-uses of 'f' are included in the references to the function.
|
||||
|
||||
goTo.marker();
|
||||
let ranges = test.ranges();
|
||||
verify.referencesCountIs(ranges.length);
|
||||
|
||||
for (let expectedReference of ranges) {
|
||||
verify.referencesAtPositionContains(expectedReference);
|
||||
}
|
||||
+3
@@ -11,5 +11,8 @@
|
||||
////namespace /**/DefaultExportedFunction {
|
||||
////}
|
||||
|
||||
// The namespace and function do not merge,
|
||||
// so the namespace should be all alone.
|
||||
|
||||
goTo.marker();
|
||||
verify.referencesCountIs(1);
|
||||
+3
@@ -10,5 +10,8 @@
|
||||
////namespace /**/DefaultExportedClass {
|
||||
////}
|
||||
|
||||
// The namespace and class do not merge,
|
||||
// so the namespace should be all alone.
|
||||
|
||||
goTo.marker();
|
||||
verify.referencesCountIs(1);
|
||||
@@ -1,17 +0,0 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function f() {
|
||||
//// return 100;
|
||||
////}
|
||||
////
|
||||
////export default f;
|
||||
////
|
||||
////var x: typeof f;
|
||||
////
|
||||
////var y = f();
|
||||
////
|
||||
////namespace /**/f {
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.referencesCountIs(1);
|
||||
Reference in New Issue
Block a user