[Mono-list] Odd behavior

Bob Doan bdoan@sicompos.com
24 Feb 2002 10:33:52 -0500


Err.. that part was not really bothering me but the other two
AssertEquals were......

I'm not sure how the stack is handled... but it seems to not work in a
case I sent to the list ....  If I do a CompareTo right in an
AssertEquals my test will fail, but if I store it to an int first...
then my test will pass..... that is what is bothering me.......

.
.
.

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);  
 }

Any Ideas?

Thanks!

- Bob



> This is probably because the documentation says:
> Use IsNaN to determine whether a value is not a number. It is not possible
> to determine whether a value is not a number by comparing it to another
> value equal to NaN.
> 
> > Could someone explain to me why my //TODO's don't work..
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
--