feat(transpiler): implement @IMPLEMENTS
This commit is contained in:
22
tools/transpiler/spec/interfaces_spec.js
Normal file
22
tools/transpiler/spec/interfaces_spec.js
Normal file
@ -0,0 +1,22 @@
|
||||
import {ddescribe, describe, it, expect, IS_DARTIUM} from 'test_lib/test_lib';
|
||||
import {IMPLEMENTS} from './fixtures/annotations';
|
||||
|
||||
class Interface1 {}
|
||||
class Interface2 {}
|
||||
|
||||
@IMPLEMENTS(Interface1, Interface2)
|
||||
class SomeClass {}
|
||||
|
||||
export function main() {
|
||||
describe('interfaces', function() {
|
||||
//TODO: remvoe when interfaces are supported in AtScript
|
||||
if (IS_DARTIUM) {
|
||||
it('should work', function () {
|
||||
var s = new SomeClass();
|
||||
expect(s instanceof Interface1).toBeTrue();
|
||||
expect(s instanceof Interface2).toBeTrue();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
Reference in New Issue
Block a user