Skip to content
Draft
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
12 changes: 6 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MicrosoftBuildTasksCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildTasksCorePackageVersion>
<MicrosoftBuildUtilitiesCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildUtilitiesCorePackageVersion>
<NUnitConsoleRunnerPackageVersion>3.22.0</NUnitConsoleRunnerPackageVersion>
<NUnitXmlTestLoggerPackageVersion>3.1.15</NUnitXmlTestLoggerPackageVersion>
<NUnitXmlTestLoggerPackageVersion>8.0.0</NUnitXmlTestLoggerPackageVersion>
<!-- Fix transient dependency issue found by component governance 4.7.0 -> 4.7.2 brought by Microsoft.Build package -->
<SystemDrawingCommonPackageVersion>4.7.2</SystemDrawingCommonPackageVersion>
<!-- Fix transient dependency issue found by component governance 4.7.0 -> 4.7.1 brought by Microsoft.Build.Tasks.Core package -->
Expand All @@ -19,11 +19,11 @@
<libclangPackageVersion>21.1.8</libclangPackageVersion>
<MicrosoftNETTestSdkPackageVersion>18.0.1</MicrosoftNETTestSdkPackageVersion>
<MonoCecilPackageVersion>0.11.6</MonoCecilPackageVersion>
<NUnit3TestAdapterPackageVersion>6.1.0</NUnit3TestAdapterPackageVersion>
<NUnitAnalyzersPackageVersion>4.7.0</NUnitAnalyzersPackageVersion>
<NUnitPackageVersion>4.4.0</NUnitPackageVersion>
<NUnitLitePackageVersion>3.12.0</NUnitLitePackageVersion>
<NUnitV2ResultWriterPackageVersion>3.6.0</NUnitV2ResultWriterPackageVersion>
<NUnit3TestAdapterPackageVersion>6.2.0</NUnit3TestAdapterPackageVersion>
<NUnitAnalyzersPackageVersion>4.13.0</NUnitAnalyzersPackageVersion>
<NUnitPackageVersion>4.6.1</NUnitPackageVersion>
<NUnitLitePackageVersion>$(NUnitPackageVersion)</NUnitLitePackageVersion>
<NUnitV2ResultWriterPackageVersion>3.8.0</NUnitV2ResultWriterPackageVersion>

<!-- Use the latest C# version by default -->
<LangVersion Condition="'$(LangVersion)' == ''">latest</LangVersion>
Expand Down
14 changes: 14 additions & 0 deletions tests/common/shared-dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
<DefineConstants>$(DefineConstants);NATIVEAOT</DefineConstants>
<!-- We're enabling warnaserror by default, but we're not warning-free for ILC (especially for NUnit), so disable warnaserror for ILC - https://github.com/dotnet/macios/issues/19911 -->
<IlcTreatWarningsAsErrors>false</IlcTreatWarningsAsErrors>
<!-- NUnit 4.x's EquatablesComparer calls Type.GetInterfaceMap() which requires complete type metadata.
Without this, any Assert.That(x, Is.EqualTo(y)) where x implements IEquatable<T> will throw
NotSupportedException on NativeAOT. See https://github.com/nunit/nunit/issues/3970 -->
<IlcGenerateCompleteTypeMetadata>true</IlcGenerateCompleteTypeMetadata>
<IlcTrimMetadata>false</IlcTrimMetadata>
</PropertyGroup>

<!-- Trimmer options -->
Expand All @@ -101,8 +106,12 @@
<ManagedAssemblyToLink Condition="'%(Filename)' == 'nunit.framework'">
<TrimmerSingleWarn>true</TrimmerSingleWarn>
</ManagedAssemblyToLink>
<ManagedAssemblyToLink Condition="'%(Filename)' == 'nunit.framework.legacy'">
<TrimmerSingleWarn>true</TrimmerSingleWarn>
</ManagedAssemblyToLink>
<!-- The above ItemGroup doesn't work for NativeAOT, so pass the argument manually to ILC: https://github.com/dotnet/runtime/issues/94255 -->
<IlcArg Include="--singlewarnassembly:nunit.framework" />
<IlcArg Include="--singlewarnassembly:nunit.framework.legacy" />
</ItemGroup>
</Target>

Expand All @@ -126,6 +135,11 @@
<DefineConstants>$(DefineConstants);NATIVEAOT</DefineConstants>
<!-- We're enabling warnaserror by default, but we're not warning-free for ILC (especially for NUnit), so disable warnaserror for ILC - https://github.com/dotnet/macios/issues/19911 -->
<IlcTreatWarningsAsErrors>false</IlcTreatWarningsAsErrors>
<!-- NUnit 4.x's EquatablesComparer calls Type.GetInterfaceMap() which requires complete type metadata.
Without this, any Assert.That(x, Is.EqualTo(y)) where x implements IEquatable<T> will throw
NotSupportedException on NativeAOT. See https://github.com/nunit/nunit/issues/3970 -->
<IlcGenerateCompleteTypeMetadata>true</IlcGenerateCompleteTypeMetadata>
<IlcTrimMetadata>false</IlcTrimMetadata>
</PropertyGroup>

<!--
Expand Down
1 change: 1 addition & 0 deletions tests/dotnet/UnitTests/BundleStructureTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable
if (platform != ApplePlatform.MacOSX)
AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "MonoTouch.Dialog", runtimeIdentifiers, forceSingleRid: (platform == ApplePlatform.MacCatalyst && !isReleaseBuild), includeDebugFiles: includeDebugFiles);
expectedFiles.Add (Path.Combine (assemblyDirectory, "nunit.framework.dll"));
expectedFiles.Add (Path.Combine (assemblyDirectory, "nunit.framework.legacy.dll"));
expectedFiles.Add (Path.Combine (assemblyDirectory, "nunitlite.dll"));
expectedFiles.Add (Path.Combine (assemblyDirectory, "Mono.Options.dll"));
AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "Touch.Client", runtimeIdentifiers, platform == ApplePlatform.MacOSX || (platform == ApplePlatform.MacCatalyst && !isReleaseBuild), includeDebugFiles: includeDebugFiles);
Expand Down
1 change: 0 additions & 1 deletion tests/monotouch-test/Foundation/ObjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public void ObserverTest ()
}

[Test]
[Timeout (5000)]
public void InvokeTest ()
{
var evt = new ManualResetEvent (false);
Expand Down
2 changes: 1 addition & 1 deletion tests/monotouch-test/ObjCRuntime/RegistrarTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ public virtual NSObject TestOverriddenRetainNSObject ()
[Export ("testNativeEnum1:")]
public virtual void TestNativeEnum1 (NSWritingDirection twd)
{
Assert.That (Enum.GetValues<NSWritingDirection> (), Contains.Item (twd), "TestNativeEnum1");
Assert.That (Enum.GetValues<NSWritingDirection> ().Contains (twd), "TestNativeEnum1");
}

public virtual UIPopoverArrowDirection TestNativeEnum2 {
Expand Down
8 changes: 0 additions & 8 deletions tests/monotouch-test/Security/SecSharedCredentialTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ public void AddSharedWebCredentialNullAccount ()
}

[Test]
// We do not want to block for a long period of time if the event is not set.
// We are testing the fact that the trampoline works.
[Timeout (5000)]
public void AddSharedWebCredentialNotNullPassword ()
{
Action<NSError> handler = (NSError e) => {
Expand All @@ -56,9 +54,7 @@ public void AddSharedWebCredentialNotNullPassword ()
}

[Test]
// We do not want to block for a long period of time if the event is not set.
// We are testing the fact that the trampoline works.
[Timeout (5000)]
public void AddSharedWebCredentialNullPassword ()
{
password = null;
Expand All @@ -69,9 +65,7 @@ public void AddSharedWebCredentialNullPassword ()
}

[Test]
// We do not want to block for a long period of time if the event is not set.
// We are testing the fact that the trampoline works.
[Timeout (5000)]
public void RequestSharedWebCredentialTest ()
{
Action<SecSharedCredentialInfo [], NSError> handler = (SecSharedCredentialInfo [] creds, NSError e) => {
Expand All @@ -81,9 +75,7 @@ public void RequestSharedWebCredentialTest ()
}

[Test]
// We do not want to block for a long period of time if the event is not set.
// We are testing the fact that the trampoline works.
[Timeout (5000)]
public void RequestSharedWebCredentialNullDomainAndAccountTest ()
{
Action<SecSharedCredentialInfo [], NSError> handler = (SecSharedCredentialInfo [] creds, NSError e) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/nunit.framework.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<PropertyGroup>
<XmlLinkerFile>$(MSBuildThisFileDirectory)nunit.framework.xml</XmlLinkerFile>
<AppBundleExtraOptions>--xml=$(XmlLinkerFile) $(AppBundleExtraOptions)</AppBundleExtraOptions>
<AppBundleExtraOptions Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.Mac'">--dlsym:+nunit.framework.dll $(AppBundleExtraOptions)</AppBundleExtraOptions>
<AppBundleExtraOptions Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.Mac'">--dlsym:+nunit.framework.dll --dlsym:+nunit.framework.legacy.dll $(AppBundleExtraOptions)</AppBundleExtraOptions>
</PropertyGroup>
</Project>
10 changes: 0 additions & 10 deletions tools/nunit3-console-3.10.0

This file was deleted.

10 changes: 0 additions & 10 deletions tools/nunit3-console-3.11.1

This file was deleted.

10 changes: 0 additions & 10 deletions tools/nunit3-console-3.12.0

This file was deleted.

10 changes: 0 additions & 10 deletions tools/nunit3-console-3.9.0

This file was deleted.

Loading