# New Ticket Created by  Zev Benjamin 
# Please include the string:  [perl #50520]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50520 >


See attached.


Zev
Index: t/26-method_ops.t
===================================================================
--- t/26-method_ops.t	(revision 0)
+++ t/26-method_ops.t	(revision 0)
@@ -0,0 +1,26 @@
+#!./parrot
+
+# method ops (just method calls for now)
+
+plan(2);
+
+class Foo {
+  method blarg() {
+    'ok 1 # method calls work';
+  }
+}
+
+class Bar {
+  method blarg() {
+    'not ok 1';
+  }
+}
+
+sub blarg() {
+  'ok 2 # regular subs aren\'t confused with methods';
+}
+
+my $foo := Foo.new();
+
+say($foo.blarg());
+say(blarg());

Property changes on: t/26-method_ops.t
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Index: t/11-cmp.t
===================================================================
--- t/11-cmp.t	(revision 25480)
+++ t/11-cmp.t	(working copy)
@@ -2,7 +2,7 @@
 
 # check comparisons
 
-say('1..14');
+say('1..19');
 
 ##Integers, positive and negative
 
@@ -61,3 +61,38 @@
     print("not ");
 }
 say("ok 14 # coerce string -14 into an integer");
+
+##Containers
+
+if (1,2) =:= (1,2) {
+    print("not ");
+}
+say("ok 15 # container equality, unnamed arrays");
+
+my @a := (1, 2);
+
+unless @a =:= @a {
+    print("not ");
+}
+say("ok 16 # container equality, self");
+
+my @b := @a;
+
+unless @a =:= @b {
+    print("not ");
+}
+say("ok 17 # container equality, named arrays");
+  
+my $x := 'foo';
+my $y := $x;
+my $z := 'foo';
+
+unless $x =:= $y {
+    print("not ");
+}
+say("ok 18 # container equality, string binding");
+
+if $x =:= $z {
+    print("not ");
+}
+say("ok 19 # container equality, string value");
Index: TODO.pod
===================================================================
--- TODO.pod	(revision 25480)
+++ TODO.pod	(working copy)
@@ -36,7 +36,7 @@
 
 =over 4
 
-=item * Method ops
+=item * More tests for method ops
 
 We should be able to load an external module (Pm suggests Test.pbc)
 and exercise methods using that.

Reply via email to