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

Reenable a test on iOS/tvOS/Browser that was disabled #89083

Merged
merged 1 commit into from
Jul 18, 2023
Merged
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
19 changes: 16 additions & 3 deletions src/libraries/System.Reflection/tests/AssemblyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ public void ExportedTypes(Type type, bool expected)
}

[Fact]
[SkipOnPlatform(TestPlatforms.Browser, "entry assembly won't be xunit.console on browser")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36892", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst | TestPlatforms.Android)]
public void GetEntryAssembly()
{
Assert.NotNull(Assembly.GetEntryAssembly());
Expand All @@ -158,6 +156,21 @@ public void GetEntryAssembly()
// The single file test runner is not 'xunit.console'.
correct = assembly.IndexOf("System.Reflection.Tests", StringComparison.OrdinalIgnoreCase) != -1;
}
else if (PlatformDetection.IsiOS || PlatformDetection.IstvOS)
{
// The iOS/tvOS test runner is not 'xunit.console'.
correct = assembly.IndexOf("AppleTestRunner", StringComparison.OrdinalIgnoreCase) != -1;
}
else if (PlatformDetection.IsAndroid)
{
// The Android test runner is not 'xunit.console'.
correct = assembly.IndexOf("AndroidTestRunner", StringComparison.OrdinalIgnoreCase) != -1;
}
else if (PlatformDetection.IsBrowser)
{
// The browser test runner is not 'xunit.console'.
correct = assembly.IndexOf("WasmTestRunner", StringComparison.OrdinalIgnoreCase) != -1;
}
else
{
// Under Visual Studio, the runner is 'testhost', otherwise it is 'xunit.console'.
Expand Down Expand Up @@ -778,7 +791,7 @@ public void AssemblyLoadFromBytesNeg()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36892", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst, "Symbols are in a different location on iOS/tvOS/MacCatalyst")]
public void AssemblyLoadFromBytesWithSymbols()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
Expand Down
Loading