Changeset 1915 for trunk


Ignore:
Timestamp:
2011-07-20 15:12:42 (10 months ago)
Author:
jgou
Message:

add test case for inheritance issue that we stumbled upon when looking at #462

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-jquery/src/test/kauri.util/test-core.js

    r1892 r1915  
    7575        return "X(x:'" + this.x + "'|inits:" + this.inits + ")" 
    7676    }; 
     77    Base.prototype.fn = function(){ 
     78        return "Base"; 
     79    } 
    7780 
    7881    $.inherit(Sub, Base); 
     
    9699        return "Y(x:'" + this.x + "'|y:'" + this.y + "'|inits:" + this.inits + ")" 
    97100    }; 
    98  
     101    Sub.prototype.fn = function(){ 
     102        return this['<super.call>']("fn") + "Sub"; 
     103    } 
    99104 
    100105    $.inherit(SubSub, Sub); 
     
    105110    SubSub.prototype.S = true; 
    106111 
    107     expect(8); 
     112    expect(9); 
    108113 
    109114    var s = new Sub("x", "y"); 
     
    118123    equals(s2.inits['x-deco'], "sub-deco-x"); 
    119124    equals(s2.inits['y-deco'], "sub-deco-y"); 
     125    equals(s2.fn(), "BaseSub"); 
    120126}); 
    121127 
Note: See TracChangeset for help on using the changeset viewer.