diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2017-10-02 14:03:48 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2017-10-03 08:56:11 +0100 |
commit | 07bc328a0524ea51d473545282321341bcd61e03 (patch) | |
tree | b7f274428d34df1ad82f3f6ef2969b1d9e14fb18 /cpan/Test-Simple/t/Test2/modules/Event/Subtest.t | |
parent | 9995b99e160dcf6aabd893a490cbc95bc736f00f (diff) | |
download | perl-07bc328a0524ea51d473545282321341bcd61e03.tar.gz |
Upgrade Test-Simple from version 1.302073 to 1.302096
(includes regen/lib_cleanup.pl)
Diffstat (limited to 'cpan/Test-Simple/t/Test2/modules/Event/Subtest.t')
-rw-r--r-- | cpan/Test-Simple/t/Test2/modules/Event/Subtest.t | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/cpan/Test-Simple/t/Test2/modules/Event/Subtest.t b/cpan/Test-Simple/t/Test2/modules/Event/Subtest.t index 56e1184079..209c48ec64 100644 --- a/cpan/Test-Simple/t/Test2/modules/Event/Subtest.t +++ b/cpan/Test-Simple/t/Test2/modules/Event/Subtest.t @@ -5,7 +5,7 @@ use Test2::Tools::Tiny; use Test2::Event::Subtest; my $st = 'Test2::Event::Subtest'; -my $trace = Test2::Util::Trace->new(frame => [__PACKAGE__, __FILE__, __LINE__, 'xxx']); +my $trace = Test2::EventFacet::Trace->new(frame => [__PACKAGE__, __FILE__, __LINE__, 'xxx']); my $one = $st->new( trace => $trace, pass => 1, @@ -27,4 +27,31 @@ $one->set_todo(undef); $one->set_name(''); is($one->summary, "Nameless Subtest", "unnamed summary"); +require Test2::Event::Pass; +push @{$one->subevents} => Test2::Event::Pass->new(name => 'xxx'); + +my $facet_data = $one->facet_data; +ok($facet_data->{about}, "got parent facet data"); + +is_deeply( + $facet_data->{parent}, + { + hid => "1-1-1", + buffered => 1, + children => [ + { + about => { + details => 'pass', + package => 'Test2::Event::Pass' + }, + assert => { + details => 'xxx', + pass => 1 + }, + } + ], + }, + "Got facet data" +); + done_testing; |