Lines Matching full:scope
24 Scope,
61 it('is Global Scope', function () {
62 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
66 it('is not Global Scope', function () {
67 let curScope = new Scope('curScope', sourceFile, ScopeKind.MODULE);
73 it('is Function Scope', function () {
74 let curScope = new Scope('curScope', sourceFile, ScopeKind.FUNCTION);
78 it('is not Function Scope', function () {
79 let curScope = new Scope('curScope', sourceFile, ScopeKind.MODULE);
85 it('is Class Scope', function () {
86 let curScope = new Scope('curScope', sourceFile, ScopeKind.CLASS);
90 it('is not Class Scope', function () {
91 let curScope = new Scope('curScope', sourceFile, ScopeKind.MODULE);
97 it('is Interface Scope', function () {
98 let curScope = new Scope('curScope', sourceFile, ScopeKind.INTERFACE);
102 it('is not Interface Scope', function () {
103 let curScope = new Scope('curScope', sourceFile, ScopeKind.MODULE);
109 it('is Enum Scope', function () {
110 let curScope = new Scope('curScope', sourceFile, ScopeKind.ENUM);
114 it('is not Enum Scope', function () {
115 let curScope = new Scope('curScope', sourceFile, ScopeKind.MODULE);
121 it('is ObjectLiteral Scope', function () {
122 let curScope = new Scope('curScope', sourceFile, ScopeKind.OBJECT_LITERAL);
126 it('is not ObjectLiteral Scope', function () {
127 let curScope = new Scope('curScope', sourceFile , ScopeKind.MODULE);
132 describe('unit test for Scope', function () {
135 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
152 let parentScope = new Scope('parentScope', sourceFile, ScopeKind.FUNCTION);
153 let childScope = new Scope('childScope', sourceFile, ScopeKind.BLOCK, false, parentScope);
159 it('should add definition symbol to the current scope', function () {
160 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
168 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
177 it('should add a label to the current scope', function () {
178 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
179 …name: 'testLabel', locInfo: 'locInfo', refs: [], parent: undefined, children: [], scope: curScope};
188 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
223 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
232 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
233 …name: 'testLabel', locInfo: 'locInfo', refs: [], parent: undefined, children: [], scope: curScope};
240 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
241 …nonExistentLabel', locInfo: 'locInfo', refs: [], parent: undefined, children: [], scope: curScope};
254 let curScope = new Scope('curScope', sourceFile, ScopeKind.GLOBAL);
256 it('should create a label and add it to the scope', function () {
264 assert.equal(label.scope, curScope);
275 scope: curScope
284 assert.equal(label.scope, curScope);
318 const scope = scopeManager.getScopeOfNode(node); constant
319 assert.strictEqual(scope, undefined);
324 const scope = scopeManager.getScopeOfNode(node); constant
325 assert.strictEqual(scope, undefined);
328 it('get the scope of node', function () {
332 const scope = scopeManager.getScopeOfNode(node); constant
333 assert.strictEqual(scope?.name, '');
336 it('get no scope of node', function () {
339 const scope = scopeManager.getScopeOfNode(node); constant
340 assert.strictEqual(scope, undefined);
359 const scope = scopeManager.getScopeOfNode(node); constant
360 assert.strictEqual(scope, undefined);
365 const scope = scopeManager.getScopeOfNode(node); constant
366 assert.strictEqual(scope, undefined);
369 it('get the scope of node', function () {
373 const scope = scopeManager.getScopeOfNode(node); constant
374 assert.strictEqual(scope?.name, '');
377 it('get no scope of node', function () {
380 const scope = scopeManager.getScopeOfNode(node); constant
381 assert.strictEqual(scope, undefined);
400 const scope = scopeManager.getScopeOfNode(node); constant
401 assert.strictEqual(scope, undefined);
406 const scope = scopeManager.getScopeOfNode(node); constant
407 assert.strictEqual(scope, undefined);
410 it('get the scope of node', function () {
420 const scope = scopeManager.getScopeOfNode(node); constant
421 assert.strictEqual(scope?.name, '');
423 it('get no scope of node', function () {
426 const scope = scopeManager.getScopeOfNode(node); constant
427 assert.strictEqual(scope, undefined);