Author: jonathan
Date: Wed Dec 17 04:12:42 2008
New Revision: 34019

Modified:
   trunk/languages/perl6/t/pmc/perl6multisub-type.t

Log:
[rakudo] Fix a test for multi-dispatch that didn't create classes the Perl 6 
way to do so.

Modified: trunk/languages/perl6/t/pmc/perl6multisub-type.t
==============================================================================
--- trunk/languages/perl6/t/pmc/perl6multisub-type.t    (original)
+++ trunk/languages/perl6/t/pmc/perl6multisub-type.t    Wed Dec 17 04:12:42 2008
@@ -73,17 +73,18 @@
     push $P0, $P1
 
     # Couple of classes that do the roles.
-    .local pmc C1, C2
-    C1 = new 'Class'
-    addrole C1, R1
-    C2 = new 'Class'
-    addrole C2, R2
+    .local pmc C1, C2, p6meta
+    p6meta = get_hll_global ['Perl6Object'], '$!P6META'
+    C1 = p6meta.'new_class'('C1', 'parent'=>'Any')
+    p6meta.'add_role'(R1, 'to'=>C1)
+    C2 = p6meta.'new_class'('C2', 'parent'=>'Any')
+    p6meta.'add_role'(R2, 'to'=>C2)
 
     # Tests
-    $P1 = new C1
+    $P1 = C1.'new'()
     $I0 = $P0($P1)
     is($I0, 1, 'dispatch on a role')
-    $P1 = new C2
+    $P1 = C2.'new'()
     $I0 = $P0($P1)
     is($I0, 2, 'dispatch on a role')
 .end

Reply via email to