https://bugzilla.novell.com/show_bug.cgi?id=467472


           Summary: IPAddress.Parse() may not match new IPAddress(byte[])
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: i686
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Created an attachment (id=266099)
 --> (https://bugzilla.novell.com/attachment.cgi?id=266099)
IPAddress.Equals() and IPAddress.Parse() / new IPAddress(byte[]) test case

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5)
Gecko/2008121300 SUSE/3.0.5-0.1 Firefox/3.0.5

I noticed that I was seeing a unit test failure when calling IPAddress.Equals()
on two IPAddress values. Nunit's Assert.AreEqual() prints out the ToString() of
each object and the ToString() output was the same. That got me looking at why
they might mismatch and after a few tests I hit upon the mismatch being ip
address dependent. These tests are only for ipv4 addresses as I haven't tested
anything ipv6 yet. I've attached a test case that exhibits the failure on mono
2.2 but not on .net.

Reproducible: Always

Steps to Reproduce:
1. Build test case with gmcs (using mcs means IPAddress can't parse a 4 byte
array so the tests will throw exceptions before they get to the test case)
2. Run attached test case

Actual Results:  
IPAddress.Equals() returns false for addresses that are equivalent.

Expected Results:  
IPAddress.Equals() should return true for ip addresses that are equivalent.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to