4 use Test::More tests => 18;
11 my $cp = Wx::CommandProcessor->new;
12 my $cmd = CP1->new( 0, 'first' );
14 ok( $cp->Submit( $cmd ) );
21 ok( $cp->Submit( CP1->new( 1, 'first' ) ) );
25 ok( !$cp->Submit( CP2->new ) );
27 ok( $cp->Submit( CP1->new( 1, 'second' ) ) );
28 is( $did{second}, 1 );
32 my @cmds = $cp->GetCommands;
33 is_deeply( [ map $_->GetName, @cmds ], [ qw(first first second) ] );
37 is( $did{second}, 0 );
50 use base qw(Wx::PlCommand);
55 ++$did{$self->GetName};
63 --$did{$self->GetName};
72 use base qw(Wx::PlCommand);
75 main::ok( 1, __PACKAGE__ . '::Do' );