[svn:parrot] r39199 - trunk/t/op

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed May 27 18:18:03 UTC 2009


Author: NotFound
Date: Wed May 27 18:18:01 2009
New Revision: 39199
URL: https://trac.parrot.org/parrot/changeset/39199

Log:
[test] add a test for copy to null, TT #714

Modified:
   trunk/t/op/copy.t

Modified: trunk/t/op/copy.t
==============================================================================
--- trunk/t/op/copy.t	Wed May 27 17:54:03 2009	(r39198)
+++ trunk/t/op/copy.t	Wed May 27 18:18:01 2009	(r39199)
@@ -19,10 +19,11 @@
 .sub 'main' :main
     .include 'test_more.pir'
 
-    plan(3)
+    plan(4)
 
     test_basic()
     test_rt48467()
+    test_tonull()
 .end
 
 .sub 'test_basic'
@@ -63,6 +64,22 @@
     is( dest, 3.2, 'copy should make independent copies' )
 .end
 
+.sub 'test_tonull'
+    null $P1
+    $P2 = new 'Undef'
+    .local string msg
+    msg = 'failed'
+    push_eh catch
+    copy $P1, $P2
+    goto check
+catch:
+    .get_results($P3)
+    msg = $P3 ['message']
+check:
+    pop_eh
+    is( msg, 'Null PMC in copy', 'copy to null throws' )
+.end
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list