File: serializable.t

package info (click to toggle)
libtest-tap-model-perl 0.09-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 172 kB
  • ctags: 299
  • sloc: perl: 917; makefile: 588
file content (32 lines) | stat: -rw-r--r-- 504 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
27
28
29
30
31
32
#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 6;

use Data::Dumper;

my $m;
BEGIN { use_ok($m = "Test::TAP::Model") }

isa_ok(my $x = $m->new, $m);

$x->start_file("blah");
$x->log_event(type => "test", "ok" => 1);

can_ok($x, "structure");
my $str = Dumper($x->structure);

my $y;

{
	my $VAR1;
	isa_ok($y = $m->new_with_struct(eval $str), $m);
}

is_deeply($y->structure, $x->structure, "structures are the same");

is($y->test_files, $x->test_files, "test file count is too");