-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple collection of AOT tests
- Loading branch information
Showing
5 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RootNamespace>DotNext</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<Version>5.17.0</Version> | ||
<IsPackable>false</IsPackable> | ||
<Authors>.NET Foundation and Contributors</Authors> | ||
<Product>.NEXT Family of Libraries</Product> | ||
<Description>AOT compatibility tests for .NEXT Familiy of Libraries</Description> | ||
<Copyright>Copyright © .NET Foundation and Contributors</Copyright> | ||
<PackageLicenseUrl>https://github.com/dotnet/DotNext/blob/master/LICENSE</PackageLicenseUrl> | ||
<PackageProjectUrl>https://github.com/dotnet/DotNext</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/dotnet/DotNext.git</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<InvariantGlobalization>true</InvariantGlobalization> | ||
<PublishAot>true</PublishAot> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\DotNext\DotNext.csproj"/> | ||
<PackageReference Include="MSTest.Engine" /> | ||
<PackageReference Include="MSTest.SourceGeneration" /> | ||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" /> | ||
<PackageReference Include="Microsoft.Testing.Platform.MSBuild"/> | ||
<PackageReference Include="MSTest.TestFramework" /> | ||
<PackageReference Include="MSTest.Analyzers" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace DotNext.Reflection; | ||
|
||
[TestClass] | ||
public class TaskTypeTests | ||
{ | ||
[TestMethod] | ||
public void IsCompletedSuccessfullyPropertyGetter() | ||
{ | ||
Assert.IsTrue(TaskType.IsCompletedSuccessfullyGetter(Task.CompletedTask)); | ||
} | ||
|
||
[TestMethod] | ||
public void GetResultSynchronously() | ||
{ | ||
Assert.AreEqual(42, TaskType.GetResultGetter<int>().Invoke(Task.FromResult(42))); | ||
} | ||
|
||
[TestMethod] | ||
public void IsCompletedPropertyGetter() | ||
{ | ||
Assert.IsTrue(Task.CompletedTask.GetIsCompletedGetter().Invoke()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters