-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to test if we are running mono.
- Loading branch information
Nathan Ricci
authored
May 8, 2020
1 parent
ca8c9de
commit e77572f
Showing
3 changed files
with
40 additions
and
0 deletions.
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,26 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
using System; | ||
|
||
namespace TestRunningMono | ||
{ | ||
class Program | ||
{ | ||
public static int Main(string[] args) | ||
{ | ||
const int Pass = 100, Fail = 1; | ||
bool isMono = typeof(object).Assembly.GetType("Mono.RuntimeStructs") != null; | ||
|
||
if(isMono) | ||
{ | ||
return Pass; | ||
} | ||
else | ||
{ | ||
return Fail; | ||
} | ||
} | ||
} | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
src/coreclr/tests/src/baseservices/mono/runningmono.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,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>false</Optimize> | ||
<CLRTestPriority>0</CLRTestPriority> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="runningmono.cs" /> | ||
</ItemGroup> | ||
</Project> | ||
|