From bb631eb706ef1e42ff1e6c2fdb2072b6b71e648b Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 14 Nov 2010 21:09:24 -0500 Subject: [PATCH] Added test to ensure constructor of abstract supertypes can be called --- test/test-class-abstract.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test-class-abstract.js b/test/test-class-abstract.js index 102c4ea..29e8dfe 100644 --- a/test/test-class-abstract.js +++ b/test/test-class-abstract.js @@ -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" +); +