File: 09_paper.t

package info (click to toggle)
libwx-perl 1%3A0.9932-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,300 kB
  • sloc: cpp: 11,064; perl: 8,603; ansic: 711; makefile: 53
file content (24 lines) | stat: -rwxr-xr-x 640 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w

use strict;
use Wx qw( wxThePrintPaperDatabase :print );
use Wx::Print;
use Test::More 'tests' => 3;

my $papersize = wxThePrintPaperDatabase->GetSize(wxPAPER_A4);
is( $papersize->x, 2100, 'A4 Width' );
is( $papersize->y, 2970, 'A4 Height' );

my $size = Wx::Size->new(2159,2794);
my $papertypeid = wxThePrintPaperDatabase->GetSize($size);

# size selection differs across versions and installations.
# wxPAPER_NOTE and wxPAPER_LETTER are the same size so either
# may be returned.

ok( $papertypeid == wxPAPER_LETTER || $papertypeid == wxPAPER_NOTE, 'Got Letter Size' );

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