forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.cs
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,27 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Reflection; | ||
using System.Numerics; | ||
|
||
namespace Runtime_38162 | ||
{ | ||
class Program | ||
{ | ||
static int Main(string[] args) | ||
{ | ||
bool directCall = Vector.IsHardwareAccelerated; | ||
bool reflectionCall = (bool)typeof(Vector).InvokeMember(nameof(Vector.IsHardwareAccelerated), BindingFlags.GetProperty, null, null, new object[0]); | ||
|
||
if (directCall != reflectionCall) | ||
{ | ||
Console.WriteLine($"Direct call to Vector.IsHardwareAccelerated returns {directCall}"); | ||
Console.WriteLine($"Reflection call to Vector.IsHardwareAccelerated returns {reflectionCall}"); | ||
return 1; | ||
} | ||
|
||
return 100; | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.csproj
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,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<DebugType /> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |