Added test to ensure constructor of abstract supertypes can be called
parent
0d1ba74415
commit
bb631eb706
|
@ -40,6 +40,13 @@ var Foo = Class.extend( {} );
|
|||
// abstract
|
||||
var AbstractFoo = Class.extend(
|
||||
{
|
||||
ctorCalled: false,
|
||||
|
||||
__construct: function()
|
||||
{
|
||||
this.ctorCalled = true;
|
||||
},
|
||||
|
||||
method: abstractMethod( function( one, two, three ){} ),
|
||||
|
||||
second: abstractMethod(),
|
||||
|
@ -145,3 +152,9 @@ assert.ok(
|
|||
"Concrete subclasses can be instantiated"
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
( new ConcreteFoo() ).ctorCalled,
|
||||
true,
|
||||
"Can call constructors of abstract supertypes"
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue