1
0
Fork 0

Added tests to assure that intefaces can be extended from other interfaces

closure/master
Mike Gerwitz 2010-12-01 23:13:21 -05:00
parent 0d45716a43
commit 611ee9ab35
1 changed files with 15 additions and 2 deletions

View File

@ -71,10 +71,23 @@ assert.ok(
);
var SubType = Interface.extend( BaseType, {} );
var SubType = Interface.extend( BaseType,
{
second: abstractMethod(),
});
assert.ok(
( SubType instanceof BaseType ),
( new SubType() instanceof BaseType ),
"Generic interface extend method can extend from other interfaces"
);
assert.ok(
( SubType.prototype.method === BaseType.prototype.method ),
"Interface subtypes inherit abstract methods"
);
assert.ok(
( SubType.prototype.second instanceof Function ),
"Interfaces can be extended with additional abstract methods"
);