File: 01_load.t

package info (click to toggle)
libwx-perl 0.9702-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,240 kB
  • ctags: 1,812
  • sloc: cpp: 8,988; perl: 6,366; makefile: 38; ansic: 1
file content (31 lines) | stat: -rwxr-xr-x 594 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl -w

use strict;
use Test::More tests => 6;

BEGIN { use_ok 'Wx' }

use Wx 'wxYES';
my $x = wxYES;

ok( 1, "Exported constant" );

SKIP: {
  use Wx qw(:frame :allclasses wxNO_3D wxTAB_TRAVERSAL);

  $x = wxTAB_TRAVERSAL();
  $x = wxCAPTION();

  ok( 1, "Export list with :allclasses" );
  ok( Wx::HtmlWindow->isa( 'Wx::Window' ), "Wx::Html was loaded" );
}

eval "use Wx qw(wxNO_SUCH_CONSTANT)";
ok( $@, "Error exporting missing constant: $@" );

eval "Wx::wxNO_SUCH_CONSTANT()";
ok( $@, "Error autoloading missing constant: $@" );

# Local variables: #
# mode: cperl #
# End: #