[Perlunit-users] Proposed behavioural change for assertions with undef
Status: Beta
Brought to you by:
mca1001
From: Adam S. <ad...@sp...> - 2002-05-23 14:32:25
|
I'm about to change things so that these will no longer pass: $test->assert_str_equals(undef, ''); $test->assert_str_equals('', undef); $test->assert_num_equals(undef, 0); $test->assert_num_equals(0, undef); since it's very easily conceivable that they could result in passes where there should be failures, and that is a huge no-no for test frameworks. If someone really wants to consider undef as equivalent to '' or 0, they can always manipulate the values before passing them as parameters. Speak up very swiftly if you have any objections ;-) |