Skip to content

Commit

Permalink
Explicitly document that cmp_ok() passes when the comparision is true.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael G. Schwern <schwern@pobox.com>

For #141
  • Loading branch information
schwern committed Apr 9, 2012
1 parent 9d2eba3 commit a6a80f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Test/More.pm
Expand Up @@ -440,8 +440,9 @@ sub unlike ($$;$) {
cmp_ok( $got, $op, $expected, $test_name );
Halfway between ok() and is() lies cmp_ok(). This allows you to
compare two arguments using any binary perl operator.
Halfway between C<ok()> and C<is()> lies C<cmp_ok()>. This allows you
to compare two arguments using any binary perl operator. The test
passes if the comparison is true and fails otherwise.
# ok( $got eq $expected );
cmp_ok( $got, 'eq', $expected, 'this eq that' );
Expand Down

0 comments on commit a6a80f8

Please sign in to comment.