Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / t / 11_twostage.t
1 #!/usr/bin/perl -w
2
3 use strict;
4 use Wx;
5 use lib './t';
6 use Tests_Helper 'test_frame';
7
8 package MyFrame;
9
10 use base 'Wx::Frame';
11 use Test::More 'tests' => 2;
12
13 sub new {
14 my $this = shift->SUPER::new( undef, -1, 'a' );
15
16 my $panel2 = Wx::Panel->new( $this, -1 );
17 like( "$panel2", qr/^Wx::Panel=HASH/ );
18
19 my $panel1 = Wx::Panel->new;
20 like( "$panel1", qr/^Wx::Panel=HASH/ );
21
22 $panel1->Create( $this, -1 );
23 Wx::Event::EVT_IDLE( $this,
24                      sub { $this->Destroy } );
25 $this->Destroy if ( Wx::wxMSW || Wx::wxGTK || Wx::wxMOTIF )
26                && Wx::wxVERSION() < 2.005;
27 };
28
29 package main;
30
31 test_frame( 'MyFrame' );
32 Wx::wxTheApp()->MainLoop();
33
34 # local variables:
35 # mode: cperl
36 # end: