File: ClutterGroup.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 (26 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (2)
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
use Clutter::TestHelper tests => 5;

my $group = Clutter::Group->new;
isa_ok($group, 'Clutter::Group', 'check ISA');

my @children = $group->get_children;
is(@children, 0, 'no children yet');

my $rectangle = Clutter::Rectangle->new;

$group->add($rectangle);
is($rectangle->get_parent, $group, 'check add');

@children = $group->get_children;
is(@children, 1, 'just one children');
eq_array(@children, [ $rectangle, ], 'check children');


$group->remove($rectangle);
@children = $group->get_children;
is(@children, 0, 'no children left');

__END__

Copyright (C) 2006  OpenedHand Ltd.  See the file AUTHORS for the full list.
See LICENSE for more information.