[Mono-bugs] [Bug 62580][Maj] New - string compare doesn't match ms implementation
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 5 Aug 2004 16:29:00 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by aaronwmail-sourceforge@yahoo.com.
http://bugzilla.ximian.com/show_bug.cgi?id=62580
--- shadow/62580 2004-08-05 16:29:00.000000000 -0400
+++ shadow/62580.tmp.17358 2004-08-05 16:29:00.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 62580
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details: found on win32 (win xp pro)
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: aaronwmail-sourceforge@yahoo.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: string compare doesn't match ms implementation
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+String.Compare doesn't work like microsoft implementation
+
+
+Steps to reproduce the problem:
+1.
+compile and run:
+
+using System;
+
+namespace bugs
+{
+ public class orderbug
+ {
+ public static void Main()
+ {
+ Console.WriteLine("hello");
+ string string1 = "10.1", string2 = "1.1";
+ int test = String.Compare(string1, string2);
+ Console.WriteLine(" the value of test reported by
+microsoft is 1, you got test = "+test);
+ if (test!=1)
+ {
+ throw new Exception("value of test is not
+like MS implementation :(");
+ }
+ }
+
+ }
+}
+
+2. It should print "test=1"
+3. It doesn't for my newly downloaded copy of mono.
+
+Actual Results:
+
+C:\Program Files\Mono-1.0\lib\test>mcs orderbug.cs
+Compilation succeeded
+
+C:\Program Files\Mono-1.0\lib\test>mono orderbug.exe
+hello
+ the value of test reported by microsoft is 1, you got test = -1
+
+Unhandled Exception: System.Exception: value of test is not like MS
+implementati
+on :(
+in <0x00082> bugs.orderbug:Main ()
+
+
+
+
+Expected Results:
+
+
+C:\Program Files\Mono-1.0\lib\test>orderbug.exe
+hello
+ the value of test reported by microsoft is 1, you got test = 1
+
+
+How often does this happen?
+
+every time
+
+
+Additional Information:
+
+
+I found this while trying to run the test suite
+in http://bplusdotnet.sourceforge.net and it failed.
+After poking about this seems to be the underlying issue.