1use strict; 2use warnings; 3 4use Test2::Tools::Tiny; 5use Test2::API qw/intercept context/; 6 7use ok 'Test2::Event::Pass'; 8my $CLASS = 'Test2::Event::Pass'; 9 10my $one = $CLASS->new(name => 'soup for you', trace => {frame => ['foo', 'foo.pl', 42]}); 11 12is($one->summary, "pass", 'summary'); 13is($one->increments_count, 1, 'increments_count'); 14is($one->diagnostics, 0, 'diagnostics'); 15is($one->no_display, 0, 'no_display'); 16is($one->subtest_id, undef, 'subtest_id'); 17is($one->terminate, undef, 'terminate'); 18is($one->global, undef, 'global'); 19is($one->sets_plan, undef, 'sets_plan'); 20is($one->causes_fail, 0, 'causes_fail is false'); 21 22$one->add_amnesty({tag => 'blah', details => 'blah'}); 23$one->add_info({tag => 'xxx', details => 'yyy'}); 24 25is_deeply( 26 $one->facet_data, 27 { 28 trace => {frame => ['foo', 'foo.pl', 42]}, 29 about => {package => $CLASS, details => 'pass', eid => $one->eid}, 30 assert => {pass => 1, details => 'soup for you'}, 31 amnesty => [{tag => 'blah', details => 'blah'}], 32 info => [{tag => 'xxx', details => 'yyy'}], 33 }, 34 "Got facet data" 35); 36 37done_testing; 38