xref: /openbsd-src/gnu/usr.bin/perl/cpan/Test-Simple/t/Test2/modules/EventFacet/Meta.t (revision 5759b3d249badf144a6240f7eec4dcf9df003e6b)
1use strict;
2use warnings;
3
4use Test2::Tools::Tiny;
5
6use ok 'Test2::EventFacet::Meta';
7my $CLASS = 'Test2::EventFacet::Meta';
8
9my $one = $CLASS->new(details => 'foo', a => 1, b => 'bar', x => undef, set_details => 'xxx');
10
11is($one->details, "foo", "Got details");
12is($one->set_details, "xxx", "set_details is a regular field, not a writer");
13
14is($one->a, 1, "Got 'a'");
15is($one->b, 'bar', "Got 'b'");
16is($one->x, undef, "Got 'x'");
17is($one->blah, undef, "Vivified 'blah'");
18
19is_deeply($one->clone, $one, "Cloning.");
20isnt($one->clone, $one, "Clone is a new ref");
21
22ok(!$CLASS->is_list, "is not a list");
23is($CLASS->facet_key, 'meta', "Got key");
24
25done_testing;
26