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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Oct 28 21:18:07 UTC 2010


Author: NotFound
Date: Thu Oct 28 21:18:07 2010
New Revision: 49716
URL: https://trac.parrot.org/parrot/changeset/49716

Log:
test PMCProxy init_int with invalid type

Modified:
   trunk/t/pmc/pmcproxy.t

Modified: trunk/t/pmc/pmcproxy.t
==============================================================================
--- trunk/t/pmc/pmcproxy.t	Thu Oct 28 21:15:15 2010	(r49715)
+++ trunk/t/pmc/pmcproxy.t	Thu Oct 28 21:18:07 2010	(r49716)
@@ -16,9 +16,11 @@
 
 =cut
 
+.include 'except_types.pasm'
+
 .sub main :main
     .include 'test_more.pir'
-    plan(45)
+    plan(46)
 
     new_tests()
     get_class_tests()
@@ -39,6 +41,20 @@
 
     $I0 = isa $P0, 'Foo'
     is($I0, 0, "non-default isa on PMCProxy works")
+
+    .local pmc eh
+    eh = new ['ExceptionHandler'], .EXCEPTION_INVALID_OPERATION
+    set_label eh, catch
+    push_eh eh
+    $I0 = 1
+    new $P0, ['PMCProxy'], -1
+    $I0 = 0
+    goto check
+  catch:
+    finalize eh
+  check:
+    pop_eh
+    is($I0, 1, 'Attempt to proxy invalid type throws appropiately')
 .end
 
 


More information about the parrot-commits mailing list