Changeset 22889 for t

Show
Ignore:
Timestamp:
11/05/08 22:53:18 (2 months ago)
Author:
moritz
Message:

[t/spec] add (skipped) tests for [perl #60356] (can't inherit from a class
with :: in the name), masak++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S12-class/inheritance.t

    r22219 r22889  
    33use Test; 
    44 
    5 plan 32; 
     5plan 35; 
    66 
    77class Foo { 
     
    115115    is( B.new.w, 10, 'initializer can be overriden by derived classes' ); 
    116116} 
     117 
     118# test that you can inherit from a class with :: in the name. 
     119# A rakudo regression, http://rt.perl.org/rt3/Ticket/Display.html?id=60356 
     120#?rakudo skip 'inheritance from classes with :: in the name' 
     121{ 
     122    class A::B { 
     123        method ab { 'a'; }; 
     124    }; 
     125 
     126    class A::B::C is A::B { 
     127        method abc { 'b'; }; 
     128    } 
     129    my $o = A::B::C.new; 
     130 
     131    ok defined($o), 'can instantiate object from class A::B::C'; 
     132    is $o.ab,  'a', 'can access inherited method'; 
     133    is $o.abc, 'b', 'can access directly defined method'; 
     134}