File: 16-siblings.t

package info (click to toggle)
libsvg-perl 2.52-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 412 kB
  • sloc: perl: 2,433; makefile: 2
file content (17 lines) | stat: -rwxr-xr-x 460 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;

use Test::More tests => 3;
use SVG;

# test: getFirstChild, getLastChild, getParent, getChildren

my $svg = SVG->new;
my $parent = $svg->group();
my $child1 = $parent->text->cdata("I am the first child");
my $child2 = $parent->text->cdata("I am the second child");

ok($child1->hasSiblings(), "hasSiblings");
is($child1->getNextSibling(), $child2, "getNextSibling");
is($child2->getPreviousSibling(), $child1,"getPreviousSibling");