Previous | Next
Topic: utAssert.eq Does not handle NULLs correctly
Conf: 537, Msg: 43113
From: Jay Bundy (jay.bundy@lexis-nexis.com)
Date: 6/19/01 10:27 AM

utAssert.eq Does not handle NULLs correctly Jay Bundy jaybundy jay.bundy@lexis-nexis.com Hello,

It looks like utAssert.eq calls the 'this' function with
check_this_in = against_this_in.

Then, when the 'this' function runs, raises a failed test condition only if the boolean check_this_in is NULL and the null_ok_in parm is not set. If eq has passed a NULL in EITHER check_this_in or against_this_in, the comparison result is NULL, which satisfies the check done in 'this' as ok. In other words, the following call results in a passed assertion:

utAssert.eq (
msg_in => 'This assert cannot fail'
check_this_in => 'c'
against_this_in => NULL,
null_ok_in => TRUE
);

The result of this call is a passed test. Nowhere is there an IS NULL check done against against_this_in. Am I the first to notice this?