Browse files

iclude example for isnt() as given on the perl-qa mailing list

Signed-off-by: Michael G. Schwern <>
  • Loading branch information...
1 parent a85e7ff commit 95bcdbeffd17e0a31ee5dfdf5f6ceeb7586d7c1b @szabgab szabgab committed with schwern Feb 13, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/Test/
@@ -350,6 +350,17 @@ In these cases, use ok().
ok( exists $brooklyn{tree}, 'A tree grows in Brooklyn' );
+A simple call to isnt() usually does not provide a strong test but there
+are cases when you cannot say much more about a value than that it is
+different from some other value:
+ new_ok $obj, "Foo";
+ my $clone = $obj->clone;
+ isa_ok $obj, "Foo", "Foo->clone";
+ isnt $obj, $clone, "clone() produces a different object";
For those grammatical pedants out there, there's an C<isn't()>
function which is an alias of isnt().

0 comments on commit 95bcdbe

Please sign in to comment.