File: 10_array.t

package info (click to toggle)
plsense 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,012 kB
  • sloc: perl: 9,767; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use Test::More;
use PlSense::Entity::Array;
use PlSense::Entity::Null;

my $e = PlSense::Entity::Array->new();
ok($e->isa("PlSense::Entity::Array"), "new");
is($e->get_type, "array", "get type");
is($e->to_string, "A<>", "to string");

$e->set_element(PlSense::Entity::Null->new());
is($e->to_string, "A<NULL>", "to string in null");
$e->push_address('$PlSense::VERSION');
is($e->to_string, 'A<NULL | $PlSense::VERSION>', "to string in address");

my $ee = $e->clone;
ok($ee->isa("PlSense::Entity::Array"), "clone");
is($ee->to_string, 'A<NULL | $PlSense::VERSION>', "to string of clone");

done_testing();