[Mono-bugs] [Bug 572084] New: HashSet<T>.SymmetricExceptWith assumes argument contains no duplicate items
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jan 19 17:47:58 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=572084
http://bugzilla.novell.com/show_bug.cgi?id=572084#c0
Summary: HashSet<T>.SymmetricExceptWith assumes argument
contains no duplicate items
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Core
AssignedTo: jbevain at novell.com
ReportedBy: cdhowie at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=337540)
--> (http://bugzilla.novell.com/attachment.cgi?id=337540)
Test case
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7)
Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
HashSet<T>.SymmetricExceptWith assumes that the IEnumerable<T> argument does
not contain any duplicate items, and so it behaves differently than MS.NET. If
the enumerable does contain duplicate items, it is acted on twice. So if an
enumerable is passed with only two items, and they are equal, the set will not
change since the item will be added once and removed once (not necessarily in
that order).
Reproducible: Always
Steps to Reproduce:
1. Create a HastSet<T>.
2. Create an IEnumerable<T> containing two equal elements.
3. Call HashSet<T>.SymmetricExceptWith using this enumerable.
Actual Results:
The set contents are not different following the operation.
Expected Results:
The set should now contain the element in the enumerable if it did not
previously, and should not contain the element if it did previously.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list