- isnt
Test::More isnt( value, not_expected_value, name);
Sometimes you are expecting to get a value but you don't really know what. You just know one specific value that you want to make sure you have not received.
examples/test-perl/t/isnt.t
use strict; use warnings; use lib 'lib'; use MyTools; use Test::More tests => 3; foreach my $str ('Deep Purple', 'Beatles', 'ABBA') { isnt(scramble($str), $str, $str); }
perl t/isnt.t
1..3 ok 1 - Deep Purple ok 2 - Beatles not ok 3 - ABBA # Failed test 'ABBA' # at t/isnt.t line 10. # got: 'ABBA' # expected: anything else # Looks like you failed 1 test of 3.
This isn't a good example though.