ext intercept test2_stack/;
ok(__PACKAGE__->can($_), "imported '$_\()'") for qw{
ok
is isnt
like unlike
diag note
is_deeply
warnings
exception
plan
skip_all
is' test");
is(undef, undef, "'is' undef test");
isnt("foo", "bar", "'isnt' test");
isnt("foo", undef, "'isnt' undef test 1");
isnt(undef, "foo", "'isnt' undef test 2");
like("foo", qr/o/, "'like' tes
intercept {
plan 8;
ok(0, "'ok' Test");
is("foo", "bar", "'is' test");
isnt("foo", "foo", "'isnt' test");
like("foo", qr/a/, "'like' test");
unlike("foo", qr/o/, "'unlike' tes
got: ''
# expected: '0'
ERR
#line 121
isnt("foo", "foo", 'foo isnt foo?' );
out_ok( <<OUT, <<ERR );
not ok - foo isnt foo?
OUT
# Failed test 'foo isnt foo?'
# at $0 line 121.
# got:
ore::isnt() as a replacement at ${ \__FILE__ } line 132
WARN
#line 143
isnt(undef, undef, 'undef isnt undef?');
out_ok( <<OUT, <<ERR );
not ok - undef isnt undef?
OUT
# Failed test 'undef isnt unde
ef');
no_warnings;
isnt( undef, 'foo', 'undef isnt foo');
no_warnings;
isnt( undef, '', 'undef isnt an empty string' );
isnt( undef, 0, 'undef isnt zero' );
Test::Mor
e->builder->is_num(undef, undef, 'is_num()');
Test::More->builder->isnt_num(23, undef, 'isnt_num()');
#line 45
like( undef, qr/.*/, 'undef is like anything' );
no_warnings;
eq_array( [undef,
subtest isnt => sub {
isnt('a', 'b', "a is not b");
isnt({}, [], "has is not array");
isnt(0, 1, "0 is not 1");
my $events = intercept {
isnt([], []);
isnt('a', 'a')
;
isnt(1, 1);
isnt({}, {});
};
@$events = grep {$_->isa('Test2::Event::Ok')} @$events;
is(@$events, 4, "4 events");
ok(!$_->{pass}, "Event was a failure") for @$events
ol('&isnt');
purge_symbol('&cmp_ok');
not_imported_ok(qw/is is_deeply like unlike isnt cmp_ok/);
}
use Test2::Tools::ClassicCompare;
imported_ok(qw/is is_deeply like cmp_ok unlike isnt/);
f", $ref, "flat check, ref as string left");
isnt("bar", "foo", 'not foo check');
isnt({}, "$ref", "negated flat check, ref as string right");
isnt("$ref", {}, "negated flat check, ref as strin
check");
def ok => (!is('foo', 'bar', "string mismatch"), "string mismatch");
def ok => (!isnt('foo', 'foo', "undesired match"), "undesired match");
def ok => (!like('foo', qr/a/, "no matc
'two is two is two is two' );
is( "foo", "foo", 'foo is foo' );
isnt( "foo", "bar", 'foo isnt bar');
{
use warnings;
my $warning;
local $SIG{__WARN__}= sub { $warni
.0. You should change code that uses\n"
. "Test::More::isn't() to use Test::More::isnt() as a replacement"
. " at ${ \__FILE__ } line 31\n",
"Got expected wa
qw(require_ok use_ok ok is isnt like skip can_ok
pass fail eq_array eq_hash eq_set));
can_ok(bless({}, "Test::More"), qw(require_ok use_ok ok is isnt like skip
1, async => 1);
tests outside => sub {
isnt(get_ids(), $orig, "In child (lexical)");
};
describe wrapper => sub {
case foo => sub {
isnt(get_ids(), $orig, "In child (inherited)")
ok' );
like( 'this', qr/that/, 'like' );
is( 'this', 'that', 'is' );
isnt( 'this', 'this', 'isnt' );
can_ok('Fooble', 'yarble');
isa_ok('Fooble', 'yarble');
use_ok('Foo
tikin
Schwern
Skoll
Slaymaker
ZeeGee
## proper names
Fennec
ICal
xUnit
## test jargon
Diag
diag
isnt
subtest
subtests
testsuite
testsuites
TODO
todo
todos
untestable
EventFacet
renderers
## compute
orted_ok qw{
ok pass fail skip todo diag note
plan skip_all done_testing BAIL_OUT
is isnt like unlike is_deeply cmp_ok isa_ok
can_ok
subtest
};
ok(Test2::Plugin::ExitSummary->ac
ag");
is($one->inherited, 0, "Got 'inherited' value");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
ok($CLASS->is_list, "is a list");
is($CLASS->facet_key
=> 'foo');
is($one->details, "foo", "Got details");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
my $two = $one->clone(details => 'bar');
is($one->deta
lue");
is($one->encoding, 'utf8', "Got 'utf8' value");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
ok(!$CLASS->is_list, "is not a list");
is($CLASS->face
:API::run_subtest("this subtest forks" => sub {
if (fork) {
wait;
isnt($?, 0, "subprocess died");
} else {
# Prevent the exception from being render
, "Got tag");
is($one->debug, 0, "Got 'debug' value");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
ok($CLASS->is_list, "is a list");
is($CLASS->facet_key
;
{
my $new_tb = Test::Builder::NoOutput->create;
isa_ok $new_tb, 'Test::Builder';
isnt $more_tb, $new_tb, 'Test::Builder->create makes a new object';
$new_tb->plan(tests => 1);
"Got 'x'");
is($one->blah, undef, "Vivified 'blah'");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
ok(!$CLASS->is_list, "is not a list");
is($CLASS->face
'tag' value");
is($one->fail, 1, "Got 'fail' value");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
ok($CLASS->is_list, "is a list");
is($CLASS->facet_key
not_imported_ok
ref_ok ref_is ref_is_not
mock mocked
dies lives try_ok
is like isnt unlike
match mismatch validator
hash array object meta number string bool check_isa
i
alue");
is($one->no_debug, 1, "Got 'no_debug' value");
is_deeply($one->clone, $one, "Cloning.");
isnt($one->clone, $one, "Clone is a new ref");
ok(!$CLASS->is_list, "is not a list");
is($CLASS->face