[Mono-list] (no subject)

Jeffrey Stedfast fejj@ximian.com
22 Feb 2002 19:15:53 -0500


Very right. Good that you pointed that out btw. In my System.String
implementation, Compare*() returns <0, 0, or >0 - just like strcmp, it
returns the difference of the first chars it finds that are not equal so
-1 and 1 will rarely ever happen.

Jeff

On Fri, 2002-02-22 at 19:00, Nick Drochak wrote:
> David,
> 
> The docs say CompareTo() returns values "Less than zero" and "Greater
> than zero".  So, it seems that testing for -1 and +1 isn't exactly
> correct.  Maybe it's a java thang?
> 
> This code was in your EnumTest:
> 		AssertEquals("should equal", 0, x.CompareTo(x));
> 		AssertEquals("less than", -1, x.CompareTo(y));
> 		AssertEquals("greater than", 1, y.CompareTo(x));
> 
> 
> Regards,
> Nick D.
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj@ximian.com  - www.ximian.com