[svn:parrot] r48735 - trunk/t/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Tue Aug 31 11:58:23 UTC 2010


Author: NotFound
Date: Tue Aug 31 11:58:22 2010
New Revision: 48735
URL: https://trac.parrot.org/parrot/changeset/48735

Log:
test backtrace method with unthrown Exception

Modified:
   trunk/t/pmc/exception.t

Modified: trunk/t/pmc/exception.t
==============================================================================
--- trunk/t/pmc/exception.t	Tue Aug 31 11:55:31 2010	(r48734)
+++ trunk/t/pmc/exception.t	Tue Aug 31 11:58:22 2010	(r48735)
@@ -20,7 +20,7 @@
 
 .sub main :main
     .include 'test_more.pir'
-    plan(36)
+    plan(37)
     test_bool()
     test_int()
     test_integer_keyed()
@@ -34,6 +34,7 @@
     test_throw_obj()
     test_clone()
     test_throw_clone()
+    test_backtrace()
 .end
 
 .sub test_bool
@@ -330,6 +331,14 @@
     is(result, 1, 'caught a cloned Exception with payload')
 .end
 
+.sub test_backtrace
+    .local pmc ex, bt
+    ex = new ['Exception']
+    bt = ex.'backtrace'()
+    $I0 = isnull bt
+    is($I0, 0, 'got backtrace from unthrow Exception')
+.end
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list