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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#!/usr/bin/perl -w
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GtkFontButton.t,v 1.5 2004/03/17 03:52:24 muppetman Exp $
use Gtk2::TestHelper
tests => 12,
at_least_version => [2, 4, 0, "GtkFontButton is new in 2.4"],
;
my $fbn;
$fbn = Gtk2::FontButton->new;
isa_ok ($fbn, 'Gtk2::FontButton');
$fbn = Gtk2::FontButton->new_with_font ("monospace");
isa_ok ($fbn, 'Gtk2::FontButton');
$fbn->set_title ("slartibartfast");
is ($fbn->get_title, "slartibartfast");
$fbn->set_use_font (FALSE);
ok (!$fbn->get_use_font);
$fbn->set_use_font (TRUE);
ok ($fbn->get_use_font);
$fbn->set_use_size (FALSE);
ok (!$fbn->get_use_size);
$fbn->set_use_size (TRUE);
ok ($fbn->get_use_size);
$fbn->set_show_style (FALSE);
ok (!$fbn->get_show_style);
$fbn->set_show_style (TRUE);
ok ($fbn->get_show_style);
$fbn->set_show_size (FALSE);
ok (!$fbn->get_show_size);
$fbn->set_show_size (TRUE);
ok ($fbn->get_show_size);
$fbn->set_font_name ("sans");
like ($fbn->get_font_name, qr/sans/i);
__END__
Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
full list). See LICENSE for more information.
|