2 # Copyright (C) 2007-2010, Parrot Foundation.
7 t/pmc/eventhandler.t - Parrot Event Handling
11 % prove t/pmc/eventhandler.t
15 Tests the EventHandler PMC used by the event system.
20 .include 'test_more.pir'
24 create_an_event_and_set_attributes()
27 .sub create_an_event_and_set_attributes
29 eh = new ['EventHandler']
31 is( $S0, 'EventHandler', 'Created EventHandler' )
42 priority = new ['Integer']
44 init['priority'] = priority
47 code = get_global 'my_handler'
50 eh = new ['EventHandler'], init
52 is( $S0, 'EventHandler', 'Created EventHandler with args' )
55 is( $S1, 'cool event', 'Event type confirmed' )
58 eh = new ['EventHandler'], code
61 ok( 1, 'No exception from initializer' )
65 ok( 0, 'Exception with bad initializer' )
77 # vim: expandtab shiftwidth=4 ft=pir: