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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Sun Jun 20 09:31:45 UTC 2010


Author: NotFound
Date: Sun Jun 20 09:31:44 2010
New Revision: 47725
URL: https://trac.parrot.org/parrot/changeset/47725

Log:
test SchedulerMessage invalid initialization

Modified:
   trunk/t/pmc/schedulermessage.t

Modified: trunk/t/pmc/schedulermessage.t
==============================================================================
--- trunk/t/pmc/schedulermessage.t	Sun Jun 20 09:17:23 2010	(r47724)
+++ trunk/t/pmc/schedulermessage.t	Sun Jun 20 09:31:44 2010	(r47725)
@@ -16,10 +16,12 @@
 
 =cut
 
+.include 'except_types.pasm'
+
 .sub main :main
     .include 'test_more.pir'
 
-    plan(7)
+    plan(8)
 
     init_check()
     type_and_id_tests()
@@ -30,6 +32,22 @@
 .sub init_check
     new $P0, ['SchedulerMessage']
     ok(1, 'Instantiated SchedulerMessage PMC')
+
+    .local pmc eh
+    eh = new ['ExceptionHandler']
+    eh.'handle_types'(.EXCEPTION_INVALID_OPERATION)
+    set_addr eh, catch
+    push_eh eh
+    $I0 = 1
+    $P1 = new ['Integer']
+    $P0 = new ['SchedulerMessage'], $P1
+    $I0 = 0
+    goto check
+catch:
+    finalize eh
+check:
+    pop_eh
+    ok($I0, 'initializing with invalid type throws')
 .end
 
 .sub type_and_id_tests


More information about the parrot-commits mailing list