Hacked By AnonymousFox

Current Path : /usr/share/doc/perl-Test-Simple/t/Legacy/subtest/
Upload File :
Current File : //usr/share/doc/perl-Test-Simple/t/Legacy/subtest/events.t

use strict;
use warnings;

use Test::More;
use Test2::API qw/intercept/;

my $events = intercept {
    subtest foo => sub {
        ok(1, "pass");
    };
};

my $st = $events->[-1];
isa_ok($st, 'Test2::Event::Subtest');
ok(my $id = $st->subtest_id, "got an id");
for my $se (@{$st->subevents}) {
    is($se->trace->hid, $id, "set subtest_id on child event");
}

done_testing;

Hacked By AnonymousFox1.0, Coded By AnonymousFox