Skip to content
Merged
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 src/tests/async/collectible-alc/collectible-alc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public class Async2CollectibleAlc
{
[Fact]
[ConditionalFact(typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.IsCollectibleAssembliesSupported))]
public static void TestEntryPoint()
{
AsyncEntryPoint().Wait();
Expand Down
3 changes: 3 additions & 0 deletions src/tests/async/collectible-alc/collectible-alc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestLibraryProjectPath)" />
</ItemGroup>
</Project>
15 changes: 13 additions & 2 deletions src/tests/async/reflection/reflection-simple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@ public static void MethodInfo_Invoke_TaskReturning()
var mi = typeof(Async2Reflection).GetMethod("Foo", BindingFlags.Static | BindingFlags.NonPublic)!;
Task<int> r = (Task<int>)mi.Invoke(null, null)!;

dynamic d = new Async2Reflection();
int barResult;
if (TestLibrary.Utilities.IsNativeAot)
{
mi = typeof(Async2Reflection).GetMethod("Bar", BindingFlags.Instance | BindingFlags.NonPublic)!;
barResult = ((Task<int>)mi.Invoke(new Async2Reflection(), null)!).Result;
}
else
{
dynamic d = new Async2Reflection();
barResult = d.Bar().Result;
}

Assert.Equal(100, (int)(r.Result + d.Bar().Result));
Assert.Equal(100, (int)(r.Result + barResult));
}

[Fact]
Expand Down Expand Up @@ -103,6 +113,7 @@ public Task TReturning()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/89157", typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNativeAot))]
public static void GetInterfaceMap()
{
Type interfaceType = typeof(IExample<Task>);
Expand Down
Loading