otherType:function(b) { var b2 = new mod.Base; assert.equal(b.otherType(b2), "Base"); assert.equal(b2.otherType(b), "Derived"); assert.equal(b.otherTypeDerived(b), "Derived"); assert.throws(function() { b.otherTypeDerived(new mod.Base); }); }
otherType:function(b) { var b2 = new mod.Base; assert.equal(b.otherType(b2), "Base"); assert.equal(b2.otherType(b), "Base"); assert.throws(function() { b.otherType(undefined); }); assert.throws(function() { b.otherType({}); }); assert.throws(function() { b.otherType(new mod.Base2); }); }
otherType:function(b) { var b2 = new mod.Base; assert.equal(b.otherType(b2), "Base"); assert.equal(b2.otherType(b), "ReDerived"); }