2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
|
|
|
|
////class Class {
|
|
|
|
//// private privateInstanceMethod() { }
|
|
|
|
//// public publicInstanceMethod() { }
|
|
|
|
////
|
|
|
|
//// private privateProperty = 1;
|
|
|
|
//// public publicProperty = 1;
|
|
|
|
////
|
|
|
|
//// private static privateStaticProperty = 1;
|
|
|
|
//// public static publicStaticProperty = 1;
|
|
|
|
////
|
|
|
|
//// private static privateStaticMethod() { }
|
|
|
|
//// public static publicStaticMethod() {
|
|
|
|
//// Class./*staticsInsideClassScope*/publicStaticMethod();
|
|
|
|
//// var c = new Class();
|
|
|
|
//// c./*instanceMembersInsideClassScope*/privateProperty;
|
|
|
|
//// }
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////Class./*staticsOutsideClassScope*/publicStaticMethod();
|
|
|
|
////var c = new Class();
|
|
|
|
////c./*instanceMembersOutsideClassScope*/privateProperty;
|
|
|
|
|
|
|
|
|
|
|
|
goTo.marker("staticsInsideClassScope");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("privateStaticProperty");
|
|
|
|
verify.completionListContains("privateStaticMethod");
|
|
|
|
verify.completionListContains("publicStaticProperty");
|
|
|
|
verify.completionListContains("publicStaticMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// No instance properties
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.not.completionListContains("privateProperty");
|
|
|
|
verify.not.completionListContains("privateInstanceMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// constructors should have a 'prototype' member
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("prototype");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("instanceMembersInsideClassScope");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("privateProperty");
|
|
|
|
verify.completionListContains("privateInstanceMethod");
|
|
|
|
verify.completionListContains("publicProperty");
|
|
|
|
verify.completionListContains("publicInstanceMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// No statics
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.not.completionListContains("privateStaticProperty");
|
|
|
|
verify.not.completionListContains("privateStaticMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
goTo.marker("staticsOutsideClassScope");
|
|
|
|
// No privates
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.not.completionListContains("privateStaticProperty");
|
|
|
|
verify.not.completionListContains("privateStaticMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// Only publics
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("publicStaticProperty");
|
|
|
|
verify.completionListContains("publicStaticMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// No instance properties
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.not.completionListContains("publicProperty");
|
|
|
|
verify.not.completionListContains("publicInstanceMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// constructors should have a 'prototype' member
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("prototype");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.marker("instanceMembersOutsideClassScope");
|
|
|
|
// No privates
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.not.completionListContains("privateProperty");
|
|
|
|
verify.not.completionListContains("privateInstanceMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// Only publics
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains("publicProperty");
|
|
|
|
verify.completionListContains("publicInstanceMethod");
|
2014-07-13 01:04:16 +02:00
|
|
|
// No statics
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.not.completionListContains("publicStaticProperty");
|
|
|
|
verify.not.completionListContains("publicStaticMethod");
|