This is co-released with
xunit.analyzers
version 1.2.0-pre.27
and
xunit.runner.visualstudio
version 2.5.0-pre.22
.
Assert.NotNull
and Assert.Null
overloads explicitly for Nullable<T>
struct values. Both include new messages, and the NotNull
variant returns the unwrapped T
value. This prevents boxing, and makes it trivial to use the non-null value. (We don't need this with the reference
versions, since the type doesn't change, it just sheds its nullability, which we automatically do with
the [NotNull]
attribute.)
xunit/xunit#2516
xunit.analyzers
, causes
compilation to report xUnit2007
and xUnit2015
warnings. These warnings aren't applicable
to the assertion library itself, so they've been suppressed with pragmas. This means you should no longer need to
ignore or disable those warnings when using xunit.assert.source
(or the Git submodule).
xunit/xunit#2472
*reporters*.dll
which may break any custom reporters you are using from first or third party assemblies without an appropriate
name.
xunit/visualstudio.xunit#317
ArgumentFormatter
and CollectionTracker
public (in the assertion library).
The former is used to pretty print values in assertion failures as well arguments for display names of data-driven
tests. The latter is a newly introduced class whose job is to prevent double enumeration while tracking the last few
values visited, so that they can be printed when assertion failures happen without requiring a second enumeration.
XUNIT_NULLABLE
was not defined,
but your project had <nullable>enable</nullable>
. You should always define XUNIT_NULLABLE
when importing xunit.assert.source
(or the Git submodule) when you have nullable enabled, but at least now
if you forget to do that, there won't be any compiler warnings as a result of you using our non-nullable path. Note
that we had to use pragmas to disable warnings rather than just using #nullable disable
in the files,
since that pragma didn't exist in C# prior to version 8 (and we set a minimum C# version of 6).