From: Enlightenment C. <no...@cv...> - 2006-09-06 20:13:54
|
Enlightenment CVS committal Author : leviathan Project : e17 Module : proto Dir : e17/proto/etk-perl/t/Etk Modified Files: Iconbox.t Label.t Log Message: fix Label alignment issue + test =================================================================== RCS file: /cvs/e/e17/proto/etk-perl/t/Etk/Iconbox.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Iconbox.t 4 Aug 2006 14:50:37 -0000 1.1 +++ Iconbox.t 6 Sep 2006 20:13:53 -0000 1.2 @@ -1,4 +1,4 @@ -use Test::More 'no_plan'; # tests => 1; +use Test::More tests => 25; use Etk; my $b = Etk::Iconbox->new(); @@ -52,11 +52,4 @@ $icon->DataSet("moo"); is($icon->DataGet(), "moo", "Data set/get"); -$icon->Select(); - -SKIP: { - skip "The icon should be shown to be selected"; - is($icon->IsSelected(), 1, "Select"); - -} =================================================================== RCS file: /cvs/e/e17/proto/etk-perl/t/Etk/Label.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Label.t 4 Aug 2006 14:50:37 -0000 1.1 +++ Label.t 6 Sep 2006 20:13:53 -0000 1.2 @@ -1,4 +1,4 @@ -use Test::More 'no_plan'; # tests => 1; +use Test::More tests => 6; use Etk; my $b = Etk::Label->new("test"); @@ -6,19 +6,16 @@ ok( defined $b, "Label new()"); ok( $b->isa("Etk::Label"), "Class Check"); -SKIP: { - skip "Must be visible", 4; - - is($b->LabelGet(), "test", "Label Get"); - - $b->LabelSet("moo"); - is($b->LabelGet(), "moo", "Label Set"); - - $b->AlignmentSet(0.5, 0.2); - - my @al = $b->AlignmentGet(); - - is($al[0], 0.5, "Alignment (xalign)"); - is($al[1], 0.2, "Alignment (yalign)"); -} +is($b->Get(), "test", "Label Get"); + +$b->Set("moo"); +is($b->Get(), "moo", "Label Set"); + +$b->AlignmentSet(0.5, 0.2); + +my @al = $b->AlignmentGet(); + +is($al[0], 0.5, "Alignment (xalign)"); +# XXX - hack - what's up with the rounding here? +is(sprintf("%0.1f", $al[1]), 0.2, "Alignment (yalign)"); |