Test::More isnt undef
- undef
use strict;
use warnings;
use Test::More tests => 2;
my $x;
isnt($x, undef);
$x = 1;
isnt($x, undef);
perl t/isnt_undef.t
Output:
1..2
not ok 1
# Failed test at t/isnt_undef.t line 7.
# got: undef
# expected: anything else
ok 2
# Looks like you failed 1 test of 2.