1Test2::Event::Ok(3) User Contributed Perl Documentation Test2::Event::Ok(3)
2
3
4
6 Test2::Event::Ok - Ok event type
7
9 Ok events are generated whenever you run a test that produces a result.
10 Examples are "ok()", and "is()".
11
13 use Test2::API qw/context/;
14 use Test2::Event::Ok;
15
16 my $ctx = context();
17 my $event = $ctx->ok($bool, $name, \@diag);
18
19 or:
20
21 my $ctx = context();
22 my $event = $ctx->send_event(
23 'Ok',
24 pass => $bool,
25 name => $name,
26 );
27
29 $rb = $e->pass
30 The original true/false value of whatever was passed into the event
31 (but reduced down to 1 or 0).
32
33 $name = $e->name
34 Name of the test.
35
36 $b = $e->effective_pass
37 This is the true/false value of the test after TODO and similar
38 modifiers are taken into account.
39
41 The source code repository for Test2 can be found at
42 http://github.com/Test-More/test-more/.
43
45 Chad Granum <exodist@cpan.org>
46
48 Chad Granum <exodist@cpan.org>
49
51 Copyright 2020 Chad Granum <exodist@cpan.org>.
52
53 This program is free software; you can redistribute it and/or modify it
54 under the same terms as Perl itself.
55
56 See http://dev.perl.org/licenses/
57
58
59
60perl v5.34.0 2022-03-05 Test2::Event::Ok(3)