chromatic / modern_perl_book

Modern Perl: the book
http://www.modernperlbooks.com/
664 stars 187 forks source link

Chapter 9, Page 138 - cmp_ok argument order #241

Closed revhippie closed 9 years ago

revhippie commented 10 years ago

cmp_ok( 100, $cur_balance, '<=', 'I should have at least $100' ); cmp_ok( $monkey, $ape, '==', 'Simian numifications should agree' );

The comparator should go between the items being compared; from Test::More docs:

cmp_ok( $got, $op, $expected, $test_name );
chromatic commented 9 years ago

Thanks, fixed!