Core Framework v2 2.6.3 2023 December 8
Today, we're shipping three new releases:
- xUnit.net Core Framework v2
2.6.3
- xUnit.net Analyzers 1.7.0 (release notes)
- xUnit.net Visual Studio adapter 2.5.5 (release notes)
It's been 3 weeks since the release of 2.6.2
.
As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
Release Notes
These release notes are a comprehensive list of changes from 2.6.2
to 2.6.3
.
Assertion Library
Attempts to call equality comparison (
Assert.Equal
andAssert.NotEqual
) with the overload that takes a comparison function, while comparing two sets (that is, any collection implementingISet<T>
orIReadOnlySet<T>
) will now throw. Previously the behavior was undefined. The reasoning behind this inspired a new documentation page ("Equality with hash sets vs. linear containers"), which describes the reasoning behind this change.The order of precedence for equality assertion now places implementation of
IEquatable<T>
higher than attempting to treat items as containers. This allows developers who want to customize container comparison to implement this interface. Note that all other comparison interfaces remain lower priority, so this is the only supported interface for customized container comparison. xunit/xunit#2828Overloads of
Assert.Contains
andAssert.DoesNotContain
forSortedSet<T>
andImmutableSortedSet<T>
have been added, to help deal with compiler ambiguity. xunit/xunit#2811BUG: Fixed an issue where
null
values in dictionaries weren't being properly compared. xunit/xunit#2824
Runner Utility
- Several "delegating sink" classes were deprecated, and combined into a single new class (
ExecutionSink
) which performs all the duties of the previously separate classes. These classes already had strong ordering dependencies on one another, and the current implementation of those classes were causing an issue where sometimes XML output was missing, due to a race condition. For an example of the changes to use the new class, please see this commit which updates the Visual Studio adapter to use the new class. xunit/xunit#2090