Skip to content

Commit

Permalink
Use more accurate condition to suppress GetAssemblyName test (#76591)
Browse files Browse the repository at this point in the history
Fixes #68980
  • Loading branch information
jkotas authored Oct 4, 2022
1 parent edd765b commit 782aa15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libraries/System.Reflection/tests/AssemblyNameTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,11 @@ public static void Clone()
[Fact]
public static void GetAssemblyName()
{
if (!PlatformDetection.IsNativeAot)
Assembly a = typeof(AssemblyNameTests).Assembly;
string assemblyLocation = AssemblyPathHelper.GetAssemblyLocation(a);
if (!string.IsNullOrEmpty(assemblyLocation))
{
Assembly a = typeof(AssemblyNameTests).Assembly;
Assert.Equal(new AssemblyName(a.FullName).ToString(), AssemblyName.GetAssemblyName(AssemblyPathHelper.GetAssemblyLocation(a)).ToString());
Assert.Equal(new AssemblyName(a.FullName).ToString(), AssemblyName.GetAssemblyName(assemblyLocation).ToString());
}
}

Expand Down

0 comments on commit 782aa15

Please sign in to comment.