brighterscript 1.0.0-alpha.26 → 1.0.0-alpha.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -5
- package/dist/AstValidationSegmenter.d.ts +1 -1
- package/dist/AstValidationSegmenter.js +2 -3
- package/dist/AstValidationSegmenter.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +1 -3
- package/dist/DiagnosticMessages.js +5 -8
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/Program.js +24 -25
- package/dist/Program.js.map +1 -1
- package/dist/Scope.d.ts +2 -8
- package/dist/Scope.js +20 -22
- package/dist/Scope.js.map +1 -1
- package/dist/SymbolTable.d.ts +1 -8
- package/dist/SymbolTable.js +1 -10
- package/dist/SymbolTable.js.map +1 -1
- package/dist/SymbolTableFlag.d.ts +8 -0
- package/dist/SymbolTableFlag.js +13 -0
- package/dist/SymbolTableFlag.js.map +1 -0
- package/dist/XmlScope.d.ts +1 -1
- package/dist/XmlScope.js +6 -7
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +1 -2
- package/dist/astUtils/CachedLookups.js +0 -11
- package/dist/astUtils/CachedLookups.js.map +1 -1
- package/dist/astUtils/creators.js +45 -6
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +2 -0
- package/dist/astUtils/reflection.js +11 -3
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +1 -1
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.js +20 -20
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.js +26 -6
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +74 -2
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +2 -3
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.js +25 -26
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +6 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +70 -20
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +92 -10
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +1 -1
- package/dist/files/BrsFile.Class.spec.js +4 -3
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +3 -4
- package/dist/files/BrsFile.js +19 -112
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +56 -156
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/XmlFile.d.ts +2 -3
- package/dist/files/XmlFile.js +0 -2
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/interfaces.d.ts +77 -83
- package/dist/interfaces.js +9 -9
- package/dist/interfaces.js.map +1 -1
- package/dist/parser/Expression.d.ts +85 -91
- package/dist/parser/Expression.js +50 -28
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +15 -16
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +1 -2
- package/dist/parser/Parser.js +68 -62
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.js +27 -28
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.js +49 -35
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +36 -24
- package/dist/parser/SGTypes.js +26 -55
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +138 -139
- package/dist/parser/Statement.js +50 -37
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/tests/expression/TypeExpression.spec.js +8 -9
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +9 -2
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/roku-types/data.json +70 -52
- package/dist/roku-types/index.d.ts +43 -21
- package/dist/types/ArrayType.js +1 -2
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +7 -8
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/AssociativeArrayType.js +2 -3
- package/dist/types/AssociativeArrayType.js.map +1 -1
- package/dist/types/BscType.d.ts +1 -1
- package/dist/types/BscType.js +2 -3
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.js +7 -8
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.spec.js +31 -32
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -1
- package/dist/types/ClassType.spec.js +10 -11
- package/dist/types/ClassType.spec.js.map +1 -1
- package/dist/types/ComponentType.d.ts +2 -1
- package/dist/types/ComponentType.js.map +1 -1
- package/dist/types/EnumType.js +2 -3
- package/dist/types/EnumType.js.map +1 -1
- package/dist/types/InheritableType.js +3 -4
- package/dist/types/InheritableType.js.map +1 -1
- package/dist/types/InterfaceType.js +2 -3
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +3 -4
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/ObjectType.js +1 -2
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +1 -1
- package/dist/types/ReferenceType.spec.js +21 -22
- package/dist/types/ReferenceType.spec.js.map +1 -1
- package/dist/types/UnionType.js +3 -3
- package/dist/types/UnionType.js.map +1 -1
- package/dist/types/UnionType.spec.js +37 -38
- package/dist/types/UnionType.spec.js.map +1 -1
- package/dist/types/helper.spec.js +4 -5
- package/dist/types/helper.spec.js.map +1 -1
- package/dist/util.d.ts +3 -3
- package/dist/util.js +20 -19
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +0 -9
- package/dist/validators/ClassValidator.js +3 -46
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ const chai_config_spec_1 = require("../chai-config.spec");
|
|
|
4
4
|
const sinonImport = require("sinon");
|
|
5
5
|
const vscode_languageserver_1 = require("vscode-languageserver");
|
|
6
6
|
const Program_1 = require("../Program");
|
|
7
|
-
const BooleanType_1 = require("../types/BooleanType");
|
|
8
7
|
const DynamicType_1 = require("../types/DynamicType");
|
|
9
8
|
const TypedFunctionType_1 = require("../types/TypedFunctionType");
|
|
10
9
|
const IntegerType_1 = require("../types/IntegerType");
|
|
@@ -23,7 +22,6 @@ const fsExtra = require("fs-extra");
|
|
|
23
22
|
const vscode_uri_1 = require("vscode-uri");
|
|
24
23
|
const undent_1 = require("undent");
|
|
25
24
|
const testHelpers_spec_2 = require("../testHelpers.spec");
|
|
26
|
-
const SymbolTable_1 = require("../SymbolTable");
|
|
27
25
|
const types_1 = require("../types");
|
|
28
26
|
let sinon = sinonImport.createSandbox();
|
|
29
27
|
describe('BrsFile', () => {
|
|
@@ -187,7 +185,7 @@ describe('BrsFile', () => {
|
|
|
187
185
|
(0, chai_config_spec_1.expect)(file.ownScriptImports).to.be.empty;
|
|
188
186
|
file.parser.ast.statements.push(new Statement_1.ImportStatement({
|
|
189
187
|
import: (0, creators_1.createToken)(TokenKind_1.TokenKind.Import),
|
|
190
|
-
|
|
188
|
+
path: (0, creators_1.createToken)(TokenKind_1.TokenKind.StringLiteral, 'pkg:/source/lib.brs')
|
|
191
189
|
}));
|
|
192
190
|
(0, chai_config_spec_1.expect)(file.ownScriptImports).to.be.empty;
|
|
193
191
|
file['_cachedLookups'].invalidate();
|
|
@@ -1105,26 +1103,6 @@ describe('BrsFile', () => {
|
|
|
1105
1103
|
(0, chai_config_spec_1.expect)(file.callables[1].name).to.equal('DoA');
|
|
1106
1104
|
(0, chai_config_spec_1.expect)(file.callables[1].nameRange.start.line).to.equal(5);
|
|
1107
1105
|
});
|
|
1108
|
-
it('finds function call line and column numbers', () => {
|
|
1109
|
-
let file = new BrsFile_1.BrsFile({
|
|
1110
|
-
srcPath: 'absolute_path/file.brs',
|
|
1111
|
-
destPath: 'relative_path/file.brs',
|
|
1112
|
-
program: program
|
|
1113
|
-
});
|
|
1114
|
-
file.parse(`
|
|
1115
|
-
function DoA()
|
|
1116
|
-
DoB("a")
|
|
1117
|
-
end function
|
|
1118
|
-
function DoB(a as string)
|
|
1119
|
-
DoC()
|
|
1120
|
-
end function
|
|
1121
|
-
`);
|
|
1122
|
-
(0, chai_config_spec_1.expect)(file.functionCalls.length).to.equal(2);
|
|
1123
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].range).to.eql(vscode_languageserver_1.Range.create(2, 20, 2, 28));
|
|
1124
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].nameRange).to.eql(vscode_languageserver_1.Range.create(2, 20, 2, 23));
|
|
1125
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[1].range).to.eql(vscode_languageserver_1.Range.create(5, 20, 5, 25));
|
|
1126
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[1].nameRange).to.eql(vscode_languageserver_1.Range.create(5, 20, 5, 23));
|
|
1127
|
-
});
|
|
1128
1106
|
it('finds function calls that are unfinished', () => {
|
|
1129
1107
|
let file = new BrsFile_1.BrsFile({
|
|
1130
1108
|
srcPath: 'absolute_path/file.brs',
|
|
@@ -1146,11 +1124,6 @@ describe('BrsFile', () => {
|
|
|
1146
1124
|
DiagnosticMessages_1.DiagnosticMessages.expectedRightParenAfterFunctionCallArguments(),
|
|
1147
1125
|
DiagnosticMessages_1.DiagnosticMessages.expectedNewlineOrColon()
|
|
1148
1126
|
]);
|
|
1149
|
-
(0, chai_config_spec_1.expect)(file.functionCalls.length).to.equal(2);
|
|
1150
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].range).to.eql(vscode_languageserver_1.Range.create(2, 20, 2, 27));
|
|
1151
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].nameRange).to.eql(vscode_languageserver_1.Range.create(2, 20, 2, 23));
|
|
1152
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[1].range).to.eql(vscode_languageserver_1.Range.create(5, 20, 5, 24));
|
|
1153
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[1].nameRange).to.eql(vscode_languageserver_1.Range.create(5, 20, 5, 23));
|
|
1154
1127
|
});
|
|
1155
1128
|
it('sanitizes brs errors', () => {
|
|
1156
1129
|
let file = new BrsFile_1.BrsFile({
|
|
@@ -1327,79 +1300,6 @@ describe('BrsFile', () => {
|
|
|
1327
1300
|
(0, chai_config_spec_1.expect)(callable.params[2].type).instanceof(StringType_1.StringType);
|
|
1328
1301
|
});
|
|
1329
1302
|
});
|
|
1330
|
-
describe('findCallableInvocations', () => {
|
|
1331
|
-
it('finds arguments with literal values', () => {
|
|
1332
|
-
let file = new BrsFile_1.BrsFile({
|
|
1333
|
-
srcPath: 'absolute_path/file.brs',
|
|
1334
|
-
destPath: 'relative_path/file.brs',
|
|
1335
|
-
program: program
|
|
1336
|
-
});
|
|
1337
|
-
file.parse(`
|
|
1338
|
-
function Sum()
|
|
1339
|
-
DoSomething("name", 12, true)
|
|
1340
|
-
end function
|
|
1341
|
-
`);
|
|
1342
|
-
(0, chai_config_spec_1.expect)(file.functionCalls.length).to.equal(1);
|
|
1343
|
-
const argsMap = file.functionCalls[0].args.map(arg => {
|
|
1344
|
-
// disregard arg.expression, etc.
|
|
1345
|
-
return { type: arg.type, range: arg.range, text: arg.text };
|
|
1346
|
-
});
|
|
1347
|
-
(0, chai_config_spec_1.expect)(argsMap).to.eql([{
|
|
1348
|
-
type: StringType_1.StringType.instance,
|
|
1349
|
-
range: util_1.default.createRange(2, 32, 2, 38),
|
|
1350
|
-
text: '"name"'
|
|
1351
|
-
}, {
|
|
1352
|
-
type: IntegerType_1.IntegerType.instance,
|
|
1353
|
-
range: util_1.default.createRange(2, 40, 2, 42),
|
|
1354
|
-
text: '12'
|
|
1355
|
-
}, {
|
|
1356
|
-
type: BooleanType_1.BooleanType.instance,
|
|
1357
|
-
range: util_1.default.createRange(2, 44, 2, 48),
|
|
1358
|
-
text: 'true'
|
|
1359
|
-
}]);
|
|
1360
|
-
});
|
|
1361
|
-
it('finds function calls nested inside statements', () => {
|
|
1362
|
-
program.setFile(`source/main.brs`, `
|
|
1363
|
-
sub main()
|
|
1364
|
-
if true then
|
|
1365
|
-
DoesNotExist(1, 2)
|
|
1366
|
-
end if
|
|
1367
|
-
end sub
|
|
1368
|
-
`);
|
|
1369
|
-
program.validate();
|
|
1370
|
-
(0, testHelpers_spec_1.expectDiagnostics)(program, [
|
|
1371
|
-
DiagnosticMessages_1.DiagnosticMessages.cannotFindName('DoesNotExist')
|
|
1372
|
-
]);
|
|
1373
|
-
});
|
|
1374
|
-
it('finds arguments with variable values', () => {
|
|
1375
|
-
let file = new BrsFile_1.BrsFile({
|
|
1376
|
-
srcPath: 'absolute_path/file.brs',
|
|
1377
|
-
destPath: 'relative_path/file.brs',
|
|
1378
|
-
program: program
|
|
1379
|
-
});
|
|
1380
|
-
file.parse(`
|
|
1381
|
-
function Sum()
|
|
1382
|
-
count = 1
|
|
1383
|
-
name = "John"
|
|
1384
|
-
isAlive = true
|
|
1385
|
-
DoSomething(count, name, isAlive)
|
|
1386
|
-
end function
|
|
1387
|
-
`);
|
|
1388
|
-
(0, chai_config_spec_1.expect)(file.functionCalls.length).to.equal(1);
|
|
1389
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].args[0]).deep.include({
|
|
1390
|
-
type: new DynamicType_1.DynamicType(),
|
|
1391
|
-
text: 'count'
|
|
1392
|
-
});
|
|
1393
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].args[1]).deep.include({
|
|
1394
|
-
type: new DynamicType_1.DynamicType(),
|
|
1395
|
-
text: 'name'
|
|
1396
|
-
});
|
|
1397
|
-
(0, chai_config_spec_1.expect)(file.functionCalls[0].args[2]).deep.include({
|
|
1398
|
-
type: new DynamicType_1.DynamicType(),
|
|
1399
|
-
text: 'isAlive'
|
|
1400
|
-
});
|
|
1401
|
-
});
|
|
1402
|
-
});
|
|
1403
1303
|
describe('findCallables', () => {
|
|
1404
1304
|
//this test is to help with code coverage
|
|
1405
1305
|
it('skips top-level statements', () => {
|
|
@@ -3265,7 +3165,7 @@ describe('BrsFile', () => {
|
|
|
3265
3165
|
]);
|
|
3266
3166
|
const requiredSymbolsFlags = mainFile.requiredSymbols.map(x => x.flags);
|
|
3267
3167
|
(0, chai_config_spec_1.expect)(requiredSymbolsFlags).to.have.same.members([
|
|
3268
|
-
|
|
3168
|
+
2 /* SymbolTypeFlag.typetime */, 2 /* SymbolTypeFlag.typetime */, 1 /* SymbolTypeFlag.runtime */
|
|
3269
3169
|
]);
|
|
3270
3170
|
});
|
|
3271
3171
|
it('should include enums and consts that are not in the file', () => {
|
|
@@ -3292,7 +3192,7 @@ describe('BrsFile', () => {
|
|
|
3292
3192
|
]);
|
|
3293
3193
|
const requiredSymbolsFlags = mainFile.requiredSymbols.map(x => x.flags);
|
|
3294
3194
|
(0, chai_config_spec_1.expect)(requiredSymbolsFlags).to.have.same.members([
|
|
3295
|
-
|
|
3195
|
+
2 /* SymbolTypeFlag.typetime */, 1 /* SymbolTypeFlag.runtime */, 1 /* SymbolTypeFlag.runtime */, 1 /* SymbolTypeFlag.runtime */
|
|
3296
3196
|
]);
|
|
3297
3197
|
});
|
|
3298
3198
|
it('should include types not defined in the file', () => {
|
|
@@ -3322,7 +3222,7 @@ describe('BrsFile', () => {
|
|
|
3322
3222
|
]);
|
|
3323
3223
|
const requiredSymbolsFlags = mainFile.requiredSymbols.map(x => x.flags);
|
|
3324
3224
|
(0, chai_config_spec_1.expect)(requiredSymbolsFlags).to.have.same.members([
|
|
3325
|
-
|
|
3225
|
+
2 /* SymbolTypeFlag.typetime */, 2 /* SymbolTypeFlag.typetime */, 2 /* SymbolTypeFlag.typetime */, 2 /* SymbolTypeFlag.typetime */, 2 /* SymbolTypeFlag.typetime */
|
|
3326
3226
|
]);
|
|
3327
3227
|
});
|
|
3328
3228
|
it('includes namespace details', () => {
|
|
@@ -3379,7 +3279,7 @@ describe('BrsFile', () => {
|
|
|
3379
3279
|
`);
|
|
3380
3280
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3381
3281
|
(0, chai_config_spec_1.expect)(mainFile.requiredSymbols.length).to.eq(1);
|
|
3382
|
-
(0, chai_config_spec_1.expect)(mainFile.requiredSymbols[0].flags).to.eq(
|
|
3282
|
+
(0, chai_config_spec_1.expect)(mainFile.requiredSymbols[0].flags).to.eq(2 /* SymbolTypeFlag.typetime */);
|
|
3383
3283
|
});
|
|
3384
3284
|
});
|
|
3385
3285
|
describe('providedSymbols', () => {
|
|
@@ -3398,7 +3298,7 @@ describe('BrsFile', () => {
|
|
|
3398
3298
|
file: mainFile
|
|
3399
3299
|
};
|
|
3400
3300
|
program.plugins.emit('onFileValidate', validateFileEvent);
|
|
3401
|
-
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3301
|
+
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3402
3302
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3403
3303
|
const someFuncType = runtimeSymbols.get('somefunc').type;
|
|
3404
3304
|
(0, testHelpers_spec_1.expectTypeToBe)(someFuncType, TypedFunctionType_1.TypedFunctionType);
|
|
@@ -3416,14 +3316,14 @@ describe('BrsFile', () => {
|
|
|
3416
3316
|
file: mainFile
|
|
3417
3317
|
};
|
|
3418
3318
|
program.plugins.emit('onFileValidate', validateFileEvent);
|
|
3419
|
-
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3319
|
+
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3420
3320
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3421
3321
|
const someFuncType = runtimeSymbols.get('somefunc').type;
|
|
3422
3322
|
(0, testHelpers_spec_1.expectTypeToBe)(someFuncType, TypedFunctionType_1.TypedFunctionType);
|
|
3423
3323
|
const requiredSymbols = mainFile.requiredSymbols.map(x => x.typeChain[0].name);
|
|
3424
3324
|
(0, chai_config_spec_1.expect)(requiredSymbols).to.have.same.members(['OtherFileType', 'OtherFileType']);
|
|
3425
3325
|
const requiredSymbolTypes = mainFile.requiredSymbols.map(x => x.flags);
|
|
3426
|
-
(0, chai_config_spec_1.expect)(requiredSymbolTypes).to.have.same.members([
|
|
3326
|
+
(0, chai_config_spec_1.expect)(requiredSymbolTypes).to.have.same.members([1 /* SymbolTypeFlag.runtime */, 2 /* SymbolTypeFlag.typetime */]);
|
|
3427
3327
|
});
|
|
3428
3328
|
it('includes classes defined in the file', () => {
|
|
3429
3329
|
const mainFile = program.setFile('source/main.bs', `
|
|
@@ -3448,12 +3348,12 @@ describe('BrsFile', () => {
|
|
|
3448
3348
|
file: mainFile
|
|
3449
3349
|
};
|
|
3450
3350
|
program.plugins.emit('onFileValidate', validateFileEvent);
|
|
3451
|
-
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3351
|
+
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3452
3352
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(3);
|
|
3453
3353
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('klass').type, types_1.ClassType);
|
|
3454
3354
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('klass2').type, types_1.ClassType);
|
|
3455
3355
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('klass3').type, types_1.ClassType);
|
|
3456
|
-
const typetimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3356
|
+
const typetimeSymbols = mainFile.providedSymbols.symbolMap.get(2 /* SymbolTypeFlag.typetime */);
|
|
3457
3357
|
(0, chai_config_spec_1.expect)(typetimeSymbols.size).to.eq(3);
|
|
3458
3358
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('klass').type, types_1.ClassType);
|
|
3459
3359
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('klass2').type, types_1.ClassType);
|
|
@@ -3479,11 +3379,11 @@ describe('BrsFile', () => {
|
|
|
3479
3379
|
file: mainFile
|
|
3480
3380
|
};
|
|
3481
3381
|
program.plugins.emit('onFileValidate', validateFileEvent);
|
|
3482
|
-
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3382
|
+
const runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3483
3383
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3484
3384
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('myenum').type, types_1.EnumType);
|
|
3485
3385
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('mynamespace.myconst').type, types_1.FloatType);
|
|
3486
|
-
const typetimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3386
|
+
const typetimeSymbols = mainFile.providedSymbols.symbolMap.get(2 /* SymbolTypeFlag.typetime */);
|
|
3487
3387
|
(0, chai_config_spec_1.expect)(typetimeSymbols.size).to.eq(2);
|
|
3488
3388
|
(0, testHelpers_spec_1.expectTypeToBe)(typetimeSymbols.get('myinterface').type, types_1.InterfaceType);
|
|
3489
3389
|
(0, testHelpers_spec_1.expectTypeToBe)(runtimeSymbols.get('myenum').type, types_1.EnumType);
|
|
@@ -3496,7 +3396,7 @@ describe('BrsFile', () => {
|
|
|
3496
3396
|
end sub
|
|
3497
3397
|
`);
|
|
3498
3398
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3499
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3399
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3500
3400
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3501
3401
|
mainFile = program.setFile('source/main.bs', `
|
|
3502
3402
|
sub someFunc()
|
|
@@ -3508,9 +3408,9 @@ describe('BrsFile', () => {
|
|
|
3508
3408
|
end sub
|
|
3509
3409
|
`);
|
|
3510
3410
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3511
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3411
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3512
3412
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3513
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3413
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3514
3414
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3515
3415
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('somefunc2')).to.be.true;
|
|
3516
3416
|
});
|
|
@@ -3525,7 +3425,7 @@ describe('BrsFile', () => {
|
|
|
3525
3425
|
end sub
|
|
3526
3426
|
`);
|
|
3527
3427
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3528
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3428
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3529
3429
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3530
3430
|
mainFile = program.setFile('source/main.bs', `
|
|
3531
3431
|
sub someFunc()
|
|
@@ -3533,9 +3433,9 @@ describe('BrsFile', () => {
|
|
|
3533
3433
|
end sub
|
|
3534
3434
|
`);
|
|
3535
3435
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3536
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3436
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3537
3437
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3538
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3438
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3539
3439
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3540
3440
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('somefunc2')).to.be.true;
|
|
3541
3441
|
});
|
|
@@ -3545,7 +3445,7 @@ describe('BrsFile', () => {
|
|
|
3545
3445
|
end namespace
|
|
3546
3446
|
`);
|
|
3547
3447
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3548
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3448
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3549
3449
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(0);
|
|
3550
3450
|
mainFile = program.setFile('source/main.bs', `
|
|
3551
3451
|
namespace Alpha
|
|
@@ -3553,9 +3453,9 @@ describe('BrsFile', () => {
|
|
|
3553
3453
|
end namespace
|
|
3554
3454
|
`);
|
|
3555
3455
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3556
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3456
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3557
3457
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3558
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3458
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3559
3459
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3560
3460
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('alpha.abc')).to.be.true;
|
|
3561
3461
|
});
|
|
@@ -3570,7 +3470,7 @@ describe('BrsFile', () => {
|
|
|
3570
3470
|
end namespace
|
|
3571
3471
|
`);
|
|
3572
3472
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3573
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3473
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3574
3474
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3575
3475
|
mainFile = program.setFile('source/main.bs', `
|
|
3576
3476
|
sub printSomething()
|
|
@@ -3582,9 +3482,9 @@ describe('BrsFile', () => {
|
|
|
3582
3482
|
end namespace
|
|
3583
3483
|
`);
|
|
3584
3484
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3585
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3485
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3586
3486
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3587
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3487
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3588
3488
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3589
3489
|
});
|
|
3590
3490
|
it('should include changes in function signatures', () => {
|
|
@@ -3594,7 +3494,7 @@ describe('BrsFile', () => {
|
|
|
3594
3494
|
end function
|
|
3595
3495
|
`);
|
|
3596
3496
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3597
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3497
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3598
3498
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3599
3499
|
mainFile = program.setFile('source/main.bs', `
|
|
3600
3500
|
function someFunc(x, y)
|
|
@@ -3602,9 +3502,9 @@ describe('BrsFile', () => {
|
|
|
3602
3502
|
end function
|
|
3603
3503
|
`);
|
|
3604
3504
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3605
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3505
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3606
3506
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3607
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3507
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3608
3508
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3609
3509
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('somefunc'));
|
|
3610
3510
|
});
|
|
@@ -3618,7 +3518,7 @@ describe('BrsFile', () => {
|
|
|
3618
3518
|
end class
|
|
3619
3519
|
`);
|
|
3620
3520
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3621
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3521
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3622
3522
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3623
3523
|
mainFile = program.setFile('source/main.bs', `
|
|
3624
3524
|
class MyKlass
|
|
@@ -3629,12 +3529,12 @@ describe('BrsFile', () => {
|
|
|
3629
3529
|
end class
|
|
3630
3530
|
`);
|
|
3631
3531
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3632
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3532
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3633
3533
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3634
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3534
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3635
3535
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3636
3536
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('myklass'));
|
|
3637
|
-
let typeTimeChanges = mainFile.providedSymbols.changes.get(
|
|
3537
|
+
let typeTimeChanges = mainFile.providedSymbols.changes.get(2 /* SymbolTypeFlag.typetime */);
|
|
3638
3538
|
(0, chai_config_spec_1.expect)(typeTimeChanges.size).to.eq(1);
|
|
3639
3539
|
(0, chai_config_spec_1.expect)(typeTimeChanges.has('myklass'));
|
|
3640
3540
|
});
|
|
@@ -3646,9 +3546,9 @@ describe('BrsFile', () => {
|
|
|
3646
3546
|
end interface
|
|
3647
3547
|
`);
|
|
3648
3548
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3649
|
-
let typetimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3549
|
+
let typetimeSymbols = mainFile.providedSymbols.symbolMap.get(2 /* SymbolTypeFlag.typetime */);
|
|
3650
3550
|
(0, chai_config_spec_1.expect)(typetimeSymbols.size).to.eq(1);
|
|
3651
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3551
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3652
3552
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(0);
|
|
3653
3553
|
mainFile = program.setFile('source/main.bs', `
|
|
3654
3554
|
interface Iface1
|
|
@@ -3658,12 +3558,12 @@ describe('BrsFile', () => {
|
|
|
3658
3558
|
end interface
|
|
3659
3559
|
`);
|
|
3660
3560
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3661
|
-
typetimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3561
|
+
typetimeSymbols = mainFile.providedSymbols.symbolMap.get(2 /* SymbolTypeFlag.typetime */);
|
|
3662
3562
|
(0, chai_config_spec_1.expect)(typetimeSymbols.size).to.eq(1);
|
|
3663
|
-
let typeTimeChanges = mainFile.providedSymbols.changes.get(
|
|
3563
|
+
let typeTimeChanges = mainFile.providedSymbols.changes.get(2 /* SymbolTypeFlag.typetime */);
|
|
3664
3564
|
(0, chai_config_spec_1.expect)(typeTimeChanges.size).to.eq(1);
|
|
3665
3565
|
(0, chai_config_spec_1.expect)(typeTimeChanges.has('iface1'));
|
|
3666
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3566
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3667
3567
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3668
3568
|
});
|
|
3669
3569
|
it('should not include changes in enum values, if inner type is the same', () => {
|
|
@@ -3676,7 +3576,7 @@ describe('BrsFile', () => {
|
|
|
3676
3576
|
end enum
|
|
3677
3577
|
`);
|
|
3678
3578
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3679
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3579
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3680
3580
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3681
3581
|
mainFile = program.setFile('source/main.bs', `
|
|
3682
3582
|
enum MyEnum
|
|
@@ -3687,13 +3587,13 @@ describe('BrsFile', () => {
|
|
|
3687
3587
|
end enum
|
|
3688
3588
|
`);
|
|
3689
3589
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3690
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3590
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3691
3591
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3692
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3592
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3693
3593
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3694
|
-
let typetimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3594
|
+
let typetimeSymbols = mainFile.providedSymbols.symbolMap.get(2 /* SymbolTypeFlag.typetime */);
|
|
3695
3595
|
(0, chai_config_spec_1.expect)(typetimeSymbols.size).to.eq(1);
|
|
3696
|
-
let typetimeChanges = mainFile.providedSymbols.changes.get(
|
|
3596
|
+
let typetimeChanges = mainFile.providedSymbols.changes.get(2 /* SymbolTypeFlag.typetime */);
|
|
3697
3597
|
(0, chai_config_spec_1.expect)(typetimeChanges.size).to.eq(0);
|
|
3698
3598
|
});
|
|
3699
3599
|
it('should include changes in enum, if different number of members', () => {
|
|
@@ -3718,7 +3618,7 @@ describe('BrsFile', () => {
|
|
|
3718
3618
|
end enum
|
|
3719
3619
|
`);
|
|
3720
3620
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3721
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3621
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3722
3622
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(3);
|
|
3723
3623
|
mainFile = program.setFile('source/main.bs', `
|
|
3724
3624
|
enum Direction ' same
|
|
@@ -3741,9 +3641,9 @@ describe('BrsFile', () => {
|
|
|
3741
3641
|
end enum
|
|
3742
3642
|
`);
|
|
3743
3643
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3744
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3644
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3745
3645
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(3);
|
|
3746
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3646
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3747
3647
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(2);
|
|
3748
3648
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('weather'));
|
|
3749
3649
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('colors'));
|
|
@@ -3758,7 +3658,7 @@ describe('BrsFile', () => {
|
|
|
3758
3658
|
end enum
|
|
3759
3659
|
`);
|
|
3760
3660
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3761
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3661
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3762
3662
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3763
3663
|
mainFile = program.setFile('source/main.bs', `
|
|
3764
3664
|
enum Direction ' now is a string
|
|
@@ -3769,9 +3669,9 @@ describe('BrsFile', () => {
|
|
|
3769
3669
|
end enum
|
|
3770
3670
|
`);
|
|
3771
3671
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3772
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3672
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3773
3673
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3774
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3674
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3775
3675
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3776
3676
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('direction'));
|
|
3777
3677
|
});
|
|
@@ -3782,7 +3682,7 @@ describe('BrsFile', () => {
|
|
|
3782
3682
|
end namespace
|
|
3783
3683
|
`);
|
|
3784
3684
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3785
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3685
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3786
3686
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3787
3687
|
mainFile = program.setFile('source/main.bs', `
|
|
3788
3688
|
namespace alpha.beta
|
|
@@ -3790,9 +3690,9 @@ describe('BrsFile', () => {
|
|
|
3790
3690
|
end namespace
|
|
3791
3691
|
`);
|
|
3792
3692
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3793
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3693
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3794
3694
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(1);
|
|
3795
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3695
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3796
3696
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(1);
|
|
3797
3697
|
(0, chai_config_spec_1.expect)(runtimeChanges.has('alpha.beta.pi'));
|
|
3798
3698
|
});
|
|
@@ -3810,7 +3710,7 @@ describe('BrsFile', () => {
|
|
|
3810
3710
|
end sub
|
|
3811
3711
|
`);
|
|
3812
3712
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3813
|
-
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3713
|
+
let runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3814
3714
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3815
3715
|
mainFile = program.setFile('source/main.bs', `
|
|
3816
3716
|
function func1(p as string) as integer
|
|
@@ -3825,9 +3725,9 @@ describe('BrsFile', () => {
|
|
|
3825
3725
|
end sub
|
|
3826
3726
|
`);
|
|
3827
3727
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3828
|
-
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(
|
|
3728
|
+
runtimeSymbols = mainFile.providedSymbols.symbolMap.get(1 /* SymbolTypeFlag.runtime */);
|
|
3829
3729
|
(0, chai_config_spec_1.expect)(runtimeSymbols.size).to.eq(2);
|
|
3830
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3730
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3831
3731
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3832
3732
|
});
|
|
3833
3733
|
it('classes that override AA built-in methods show change properly', () => {
|
|
@@ -3843,7 +3743,7 @@ describe('BrsFile', () => {
|
|
|
3843
3743
|
// No changes!
|
|
3844
3744
|
mainFile = program.setFile('source/class.bs', classFileContent);
|
|
3845
3745
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3846
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3746
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3847
3747
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3848
3748
|
});
|
|
3849
3749
|
it('functions in a namespace that return classes show change properly', () => {
|
|
@@ -3869,7 +3769,7 @@ describe('BrsFile', () => {
|
|
|
3869
3769
|
// No changes!
|
|
3870
3770
|
mainFile = program.setFile('source/class.bs', fileContent);
|
|
3871
3771
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3872
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3772
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3873
3773
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3874
3774
|
});
|
|
3875
3775
|
it('functions in a namespace that have class params show change properly', () => {
|
|
@@ -3894,7 +3794,7 @@ describe('BrsFile', () => {
|
|
|
3894
3794
|
// No changes!
|
|
3895
3795
|
mainFile = program.setFile('source/class.bs', fileContent);
|
|
3896
3796
|
program.plugins.emit('onFileValidate', { program: program, file: mainFile });
|
|
3897
|
-
let runtimeChanges = mainFile.providedSymbols.changes.get(
|
|
3797
|
+
let runtimeChanges = mainFile.providedSymbols.changes.get(1 /* SymbolTypeFlag.runtime */);
|
|
3898
3798
|
(0, chai_config_spec_1.expect)(runtimeChanges.size).to.eq(0);
|
|
3899
3799
|
});
|
|
3900
3800
|
});
|