Adjust tests.

This commit is contained in:
Daniel Rosenwasser
2015-06-03 12:34:05 -07:00
parent 24c504415e
commit 70911a31b6
6 changed files with 90 additions and 17 deletions
@@ -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);
}
@@ -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);
@@ -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);