Debian Codegraph @

t/ffi_probe_runner_result.t

raw
1 use Test2::V0 -no_srand => 1;
2 use FFI::Probe::Runner::Result;
3
4 my %std = ( stdout => "foo\n", stderr => "bar\n", rv => 0, signal => 0 );
5
6 my $result1 = FFI::Probe::Runner::Result->new(
7 %std
8 );
9
10 isa_ok $result1, 'FFI::Probe::Runner::Result';
11 ok($result1->pass);
12
13 my $result2 = FFI::Probe::Runner::Result->new(
14 %std,
15 rv => 2,
16 );
17
18 isa_ok $result2, 'FFI::Probe::Runner::Result';
19 is($result2->rv, 2);
20 ok(!$result2->pass);
21
22 my $result3 = FFI::Probe::Runner::Result->new(
23 %std,
24 signal => 9,
25 );
26
27 isa_ok $result3, 'FFI::Probe::Runner::Result';
28 is($result3->signal, 9);
29 ok(!$result3->pass);
30
31 done_testing;