Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pick up a new build of Xunit #60044

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.test.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ dotnet_diagnostic.xUnit2012.severity = warning
dotnet_diagnostic.xUnit2013.severity = none

# xUnit2014: Do not use throws check to check for asynchronously thrown exception
dotnet_diagnostic.xUnit2014.severity = warning
dotnet_diagnostic.xUnit2014.severity = none

# xUnit2015: Do not use typeof expression to check the exception type
dotnet_diagnostic.xUnit2015.severity = warning
Expand Down
3 changes: 2 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.21501.2</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.21501.2</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>1.0.2-alpha.0.21479.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<XUnitVersion>2.4.2-pre.9</XUnitVersion>
<XUnitVersion>2.4.2-pre.13</XUnitVersion>
<XUnitAnalyzersVersion>0.12.0-pre.19</XUnitAnalyzersVersion>
<XUnitRunnerVisualStudioVersion>2.4.2</XUnitRunnerVisualStudioVersion>
<CoverletCollectorVersion>1.3.0</CoverletCollectorVersion>
<NewtonsoftJsonVersion>12.0.3</NewtonsoftJsonVersion>
Expand Down
1 change: 1 addition & 0 deletions eng/testing/xunit/xunit.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<!-- Excluding xunit.core/build as it enables deps file generation. -->
<PackageReference Include="xunit" Version="$(XUnitVersion)" ExcludeAssets="build" />
<PackageReference Include="xunit.analyzers" Version="$(XUnitAnalyzersVersion)" ExcludeAssets="build" />
<PackageReference Include="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ IEnumerable<Func<Stream, Stream>> CtorFunctions()
}
else
{
Assert.Equal(data2[i], (byte)0);
Assert.Equal((byte)0, data2[i]);
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void InstanceArgumentInsteadOfTypeForStaticCall()
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null)
}));
Func<CallSite, object, object, object, object> target = site.Target;
Assert.Throws<ArgumentException>(null, () => target.Invoke(site, "Ceci n'est pas un type", 2, 2));
AssertExtensions.Throws<ArgumentException>(null, () => target.Invoke(site, "Ceci n'est pas un type", 2, 2));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static void IListProperties()
public static void VirtualMethods()
{
VirtualTestReadOnlyCollection collectionBase = new VirtualTestReadOnlyCollection();
Assert.Equal(collectionBase.Count, int.MinValue);
Assert.Equal(int.MinValue, collectionBase.Count);
Assert.Null(collectionBase.GetEnumerator());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public void Add_SetSiteNameDuplicate_ThrowsArgumentException()
container.Add(component1, "Name1");
container.Add(component2, "Name2");

Assert.Throws<ArgumentException>(null, () => component1.Site.Name = "Name2");
AssertExtensions.Throws<ArgumentException>(null, () => component1.Site.Name = "Name2");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void Indexer_SetNotSupported_ThrowsArgumentException(object owner)
MemberRelationship source = new MemberRelationship(owner, member);

var service = new NotSupportingMemberRelationshipService();
Assert.Throws<ArgumentException>(null, () => service[source] = source);
AssertExtensions.Throws<ArgumentException>(null, () => service[source] = source);
}

private class TestClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ public void AddService_NullServiceInstance_ThrowsArgumentNullException()
public void AddService_ServiceInstanceNotInstanceOfType_ThrowsArgumentException()
{
var container = new ServiceContainer();
Assert.Throws<ArgumentException>(null, () => container.AddService(typeof(int), new object()));
Assert.Throws<ArgumentException>(null, () => container.AddService(typeof(int), new object(), true));
Assert.Throws<ArgumentException>(null, () => container.AddService(typeof(int), new object(), false));
AssertExtensions.Throws<ArgumentException>(null, () => container.AddService(typeof(int), new object()));
AssertExtensions.Throws<ArgumentException>(null, () => container.AddService(typeof(int), new object(), true));
AssertExtensions.Throws<ArgumentException>(null, () => container.AddService(typeof(int), new object(), false));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public void SqlBytesMaxLength()
{
byte[] b = null;
SqlBytes bytes = new SqlBytes();
Assert.Equal(bytes.MaxLength, -1);
Assert.Equal(-1, bytes.MaxLength);
bytes = new SqlBytes(b);
Assert.Equal(bytes.MaxLength, -1);
Assert.Equal(-1, bytes.MaxLength);
b = new byte[10];
bytes = new SqlBytes(b);
Assert.Equal(10, bytes.MaxLength);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public void SqlCharsMaxLength()
{
char[] b = null;
SqlChars chars = new SqlChars();
Assert.Equal(chars.MaxLength, -1);
Assert.Equal(-1, chars.MaxLength);
chars = new SqlChars(b);
Assert.Equal(chars.MaxLength, -1);
Assert.Equal(-1, chars.MaxLength);
b = new char[10];
chars = new SqlChars(b);
Assert.Equal(10, chars.MaxLength);
Expand Down
Loading