Skip to content

Add xunitv3assert#16555

Open
agocke wants to merge 3 commits intodotnet:mainfrom
agocke:add-xunitv3assert
Open

Add xunitv3assert#16555
agocke wants to merge 3 commits intodotnet:mainfrom
agocke:add-xunitv3assert

Conversation

@agocke
Copy link
Member

@agocke agocke commented Mar 2, 2026

This is the equivalent of the Microsoft.Dotnet.XunitAssert package, except for one thing: this one uses the built-in AOT-compatibility from upsteam xunit.

…t b21e6839e

git-subtree-dir: src/Microsoft.DotNet.XUnitV3Assert/src
git-subtree-split: b21e6839ee4ba6a426fac087f9421e13f2bd5dd4
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need to keep a separate copy or could we refresh our sources in Microsoft.DotNet.XUnitAssert ?

<PackageVersion Include="Polly.Core" Version="8.4.1" />
<PackageVersion Include="sn" Version="1.0.0" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.v3.core" Version="$(XUnitV3Version)" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move next to xunit.v3.extensibility.core


This copy of assert.xunit is intended to be AOT-compatible and contains breaking changes from the
original code. In general, code which relied on reflection or dynamic code generation has been
removed in this fork.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I diffed the sources with upstream assert.xunit and it was identical, so I assume we don't have breaking changes in the v3 version?

@@ -0,0 +1,22 @@
namespace Xunit.Internal
{
internal static class EnvironmentVariables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't in upstream assert.xunit, should we file an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants