-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
69 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
class Object; | ||
class Object | ||
native; | ||
|
||
var native name Name; | ||
var native Class Class; | ||
var native Object Outer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
class ArchetypeTemplate extends Object; | ||
|
||
const TemplateConst = "test"; | ||
|
||
var name MyName; | ||
var name MyName2; | ||
|
||
delegate MyDelegate(name param1, bool param2); | ||
delegate MyDelegate(name param1, bool param2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
class ArchetypeTest; | ||
class ArchetypeTest extends Object; | ||
|
||
const ArchetypeConst = "test"; | ||
|
||
var ArchetypeTemplate MyArchetype; | ||
|
||
defaultproperties | ||
{ | ||
begin object class=ArchetypeTemplate name=ArchetypeTemplate0 | ||
MyName=ArchetypeTemplateExample | ||
// Test for lookup of TemplateConst in subobject class 'ArchetypeTemplate' | ||
MyName=TemplateConst | ||
// Test for lookup of ArchetypeConst in document class 'ArchetypeTest' | ||
MyName2=ArchetypeConst | ||
end object | ||
MyArchetype=ArchetypeTemplate0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
import { expect } from 'chai'; | ||
import { queueIndexDocument } from "../../indexer"; | ||
import { usingDocuments } from "../utils/utils"; | ||
import { assertDocumentValidSymbolAnalysis } from "../utils/diagnosticUtils"; | ||
|
||
import { queueIndexDocument } from '../../indexer'; | ||
import { toName } from '../../name'; | ||
import { ObjectsTable, UCArchetypeSymbol } from '../../Symbols'; | ||
import { usingDocuments } from '../utils/utils'; | ||
describe("Archetype", () => { | ||
it("should have no problems", () => { | ||
usingDocuments( | ||
__dirname, | ||
[ | ||
"ArchetypeTemplate.uc", | ||
"ArchetypeTest.uc", | ||
"ArchetypeOverrideTest.uc", | ||
], | ||
([ | ||
archetypeTemplateDoc, | ||
archetypeTestDoc, | ||
archetypeOverrideTestDoc, | ||
]) => { | ||
queueIndexDocument(archetypeOverrideTestDoc); | ||
|
||
describe('Archetype', () => { | ||
usingDocuments(__dirname, ['ArchetypeTemplate.uc', 'ArchetypeTest.uc', 'ArchetypeOverrideTest.uc'], ([ | ||
, archetypeTestDoc, archetypeOverrideTestDoc | ||
]) => { | ||
it('should override base archetype', () => { | ||
queueIndexDocument(archetypeTestDoc); | ||
const subSymbol = ObjectsTable.getSymbol<UCArchetypeSymbol>(toName('ArchetypeTemplate0')); | ||
expect(subSymbol) | ||
.to.not.be.undefined; | ||
|
||
queueIndexDocument(archetypeOverrideTestDoc); | ||
const subOverrideSymbol = ObjectsTable.getSymbol<UCArchetypeSymbol>(toName('ArchetypeTemplate0')); | ||
expect(subOverrideSymbol) | ||
.to.not.be.undefined; | ||
}); | ||
assertDocumentValidSymbolAnalysis( | ||
archetypeTemplateDoc, | ||
archetypeTemplateDoc.class | ||
); | ||
assertDocumentValidSymbolAnalysis( | ||
archetypeTestDoc, | ||
archetypeTestDoc.class | ||
); | ||
assertDocumentValidSymbolAnalysis( | ||
archetypeOverrideTestDoc, | ||
archetypeOverrideTestDoc.class | ||
); | ||
} | ||
); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters