[svn:parrot] r44837 - trunk/t/oo

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Wed Mar 10 00:28:54 UTC 2010


Author: whiteknight
Date: Wed Mar 10 00:28:54 2010
New Revision: 44837
URL: https://trac.parrot.org/parrot/changeset/44837

Log:
tests for TT #1505. The matter is now resolved

Modified:
   trunk/t/oo/vtableoverride.t

Modified: trunk/t/oo/vtableoverride.t
==============================================================================
--- trunk/t/oo/vtableoverride.t	Wed Mar 10 00:19:26 2010	(r44836)
+++ trunk/t/oo/vtableoverride.t	Wed Mar 10 00:28:54 2010	(r44837)
@@ -18,11 +18,12 @@
 
 .sub main :main
     .include 'test_more.pir'
-    plan(12)
+    plan(13)
 
     newclass_tests()
     subclass_tests()
     vtable_implies_self_tests()
+    anon_vtable_tests()
 .end
 
 .sub 'newclass_tests'
@@ -88,6 +89,21 @@
   ok( $I0, ':vtable should imply the self parameter' )
 .end
 
+
+.sub 'anon_vtable_tests'
+    $P0 = newclass "AnonVtableType"
+    $P1 = new 'AnonVtableType'
+    push_eh anon_does_not_work
+    $S0 = $P1
+    is($S0, "foo", "can have :vtable :anon")
+    goto anon_end
+  anon_does_not_work:
+    ok(0, "can not have :anon :vtable")
+  anon_end:
+    pop_eh
+.end
+
+
 .namespace [ 'MyObject' ]
 
 .sub '__onload' :anon :init
@@ -171,6 +187,14 @@
     .return( 1 )
 .end
 
+
+.namespace [ 'AnonVtableType' ]
+
+.sub '' :vtable('get_string') :method :anon
+    .return("foo")
+.end
+
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list