[Mono-list] Odd behavior
Nick Drochak
ndrochak@gol.com
Mon, 25 Feb 2002 12:43:39 +0900
| public void TestCompareTo () {
| int tmp;
| tmp = d_ninf.CompareTo(d_pinf);
| AssertEquals("TODO THIS TEST FAILS: CompareTo Infinity failed!!",
| d_ninf.CompareTo(d_pinf) < 0, true);
|
| AssertEquals("TODO BUT THIS ONE DOES NOT: CompareTo Infinity
| failed!!!!!!!!!", tmp < 0, true);
| }
|
I don't have an answer to your problem with the double, but I just wanted to
comment on your use of AssertEquals(). In case you didn't know, you can
just use Assert(message, logical_expression) in this case since you are
testing for a true/false value.
Also when you do use AssertEquals(mesage, expected, actual) note the
expected value is the second parameter, and the actual value is the third.
NUnit will report a nicely formatted message when the assert fails. If you
get them backwards, the message will be misleading.
Regards,
Nick D.