File: ClutterAlpha.t

package info (click to toggle)
libclutter-perl 1.002-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 728 kB
  • ctags: 98
  • sloc: perl: 1,503; ansic: 48; makefile: 9
file content (19 lines) | stat: -rw-r--r-- 505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use Clutter::TestHelper tests => 7;

my $alpha = Clutter::Alpha->new();
isa_ok($alpha, 'Clutter::Alpha', 'is an alpha');

is($alpha->get_alpha(), 0, 'empty alpha');
is($alpha->get_timeline(), undef, 'empty timeline');

my $timeline = Clutter::Timeline->new(100);
$alpha->set_timeline($timeline);
ok(1);

is($alpha->get_timeline(), $timeline, 'same timeline');

$alpha->set_mode('linear');
is($alpha->get_alpha(), 0, 'initial value');

$timeline->advance(100);
is($alpha->get_alpha(), 1.0, 'final value');