Changeset 22869 for t

Show
Ignore:
Timestamp:
11/04/08 17:56:11 (2 months ago)
Author:
jnthn
Message:

[spectest] Some fudging/unfudging to add another test to Rakudo.

Files:
1 modified

Legend:

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

    r20418 r22869  
    2121# override the behaviour without playing with the metamodel via traits 
    2222ok($foo.isa(Foo), '.isa(Foo)'); 
    23 #?rakudo 1 skip 'parse error' 
    2423ok($foo.isa(::Foo), '.isa(::Foo)'); 
    2524ok($foo.isa("Foo"), '.isa("Foo")'); 
    2625ok(!$foo.isa("Bar"), '!.isa("Bar")'); 
    2726 
    28 my $foo_clone = $foo.clone(); 
    29 ok($foo_clone ~~ Foo, '... smartmatch our $foo_clone to the Foo class'); 
     27#?rakudo skip 'clone not yet implemetned' 
     28{ 
     29    my $foo_clone = $foo.clone(); 
     30    ok($foo_clone ~~ Foo, '... smartmatch our $foo_clone to the Foo class'); 
     31} 
    3032 
    3133class Foo::Bar {} 
     
    3537 
    3638ok($foo_bar.isa(Foo::Bar), '.isa(Foo::Bar)'); 
    37 #?rakudo 1 skip 'parse error' 
    3839ok(!$foo_bar.isa(::Foo), '!Foo::Bar.new.isa(::Foo)'); 
    3940 
     
    5051ok($bar.isa(Foo), "new Bar .isa(Foo)"); 
    5152 
    52 my $bar_clone = $bar.clone(); 
    53 ok($bar_clone ~~ Bar, '... smartmatch our $bar_clone to the Bar class'); 
    54 ok($bar_clone.isa(Bar), "... .isa(Bar)"); 
    55 ok($bar_clone ~~ Foo, '... smartmatch our $bar_clone to the Foo class'); 
    56 ok($bar_clone.isa(Foo), "... .isa(Foo)"); 
    57  
     53#?rakudo skip 'clone not yet implemetned' 
     54#?DOES 4 
     55{ 
     56    my $bar_clone = $bar.clone(); 
     57    ok($bar_clone ~~ Bar, '... smartmatch our $bar_clone to the Bar class'); 
     58    ok($bar_clone.isa(Bar), "... .isa(Bar)"); 
     59    ok($bar_clone ~~ Foo, '... smartmatch our $bar_clone to the Foo class'); 
     60    ok($bar_clone.isa(Foo), "... .isa(Foo)"); 
     61} 
    5862 
    5963# Same, but with the "is Foo" declaration inlined 
    60 #?rakudo 5 skip 'not parsing is inside class yet' 
     64#?rakudo skip 'not parsing is inside class yet' 
    6165#?DOES 3 
    62 class Baz { is Foo } 
    63 ok(Baz ~~ Foo, '... smartmatch our Baz to the Foo class'); 
    64 my $baz = Baz.new(); 
    65 ok($baz ~~ Baz, '... smartmatch our $baz to the Baz class'); 
    66 ok($baz.isa(Baz), "... .isa(Baz)"); 
    67  
     66{ 
     67    class Baz { is Foo } 
     68    ok(Baz ~~ Foo, '... smartmatch our Baz to the Foo class'); 
     69    my $baz = Baz.new(); 
     70    ok($baz ~~ Baz, '... smartmatch our $baz to the Baz class'); 
     71    ok($baz.isa(Baz), "... .isa(Baz)"); 
     72}