~ubuntu-branches/ubuntu/wily/clutter-perl/wily

« back to all changes in this revision

Viewing changes to t/ClutterAlpha.t

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2009-09-25 14:21:14 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090925142114-r1uvxq7zytn04s0p
Tags: 1.0.1-0ubuntu1
* New upstream release.
* Clutter 0.8 -> 1.0 transition. (LP: #364630)
* debian/control:
 - Bump libclutter build dep,
 - Drop deprecated clutter-gst, clutter-gtk, and 
   clutter-cairo build deps.
* debian/patches/10_notify-osd_by_default.patch:
 - Disable POD generation to fix FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
use Clutter::TestHelper tests => 8;
 
1
use Clutter::TestHelper tests => 7;
2
2
 
3
3
my $alpha = Clutter::Alpha->new();
4
4
isa_ok($alpha, 'Clutter::Alpha', 'is an alpha');
6
6
is($alpha->get_alpha(), 0, 'empty alpha');
7
7
is($alpha->get_timeline(), undef, 'empty timeline');
8
8
 
9
 
my $timeline = Clutter::Timeline->new(10, 10);
 
9
my $timeline = Clutter::Timeline->new(100);
10
10
$alpha->set_timeline($timeline);
11
11
ok(1);
12
12
 
13
13
is($alpha->get_timeline(), $timeline, 'same timeline');
14
14
 
15
 
$alpha->set_func(\&Clutter::Alpha::ramp_inc);
 
15
$alpha->set_mode('linear');
16
16
is($alpha->get_alpha(), 0, 'initial value');
17
17
 
18
 
$timeline->advance(10);
19
 
is($timeline->get_current_frame(), 10, 'advance check');
20
 
is($alpha->get_alpha(), Clutter::Alpha->MAX_ALPHA, 'final value');
 
18
$timeline->advance(100);
 
19
is($alpha->get_alpha(), 1.0, 'final value');