-
Notifications
You must be signed in to change notification settings - Fork 520
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
Martin Baulig
committed
Oct 29, 2018
1 parent
cfbcf6c
commit 947524d
Showing
19 changed files
with
239 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
mono-native-compat.csproj | ||
extra-linker-defs-*.xml |
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,34 @@ | ||
using System; | ||
using NUnit.Framework; | ||
using Mono; | ||
|
||
namespace Mono.Native.Tests | ||
{ | ||
[TestFixture] | ||
public class NativePlatformConfig | ||
{ | ||
static bool ShouldUseCompat { | ||
get { | ||
#if MONO_NATIVE_COMPAT | ||
return true; | ||
#elif MONO_NATIVE_UNIFIED | ||
return false; | ||
#else | ||
Assert.Fail ("Missing `MONO_NATIVE_COMPAT` or `MONO_NATIVE_UNIFIED`"); | ||
throw new NotImplementedException (); | ||
#endif | ||
} | ||
} | ||
[Test] | ||
public void PlatformType () | ||
{ | ||
var type = MonoNativePlatform.GetPlatformType (); | ||
Assert.That ((int)type, Is.GreaterThan (0), "platform type"); | ||
|
||
Console.Error.WriteLine ($"NATIVE PLATFORM TYPE: {type}"); | ||
|
||
var usingCompat = (type & MonoNativePlatformType.MONO_NATIVE_PLATFORM_TYPE_COMPAT) != 0; | ||
Assert.AreEqual (ShouldUseCompat, usingCompat, "using compatibility layer"); | ||
} | ||
} | ||
} |
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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<linker> | ||
<assembly fullname="mscorlib"> | ||
<type fullname="Mono.MonoNativePlatform" preserve="all" /> | ||
<type fullname="Mono.MonoNativePlatformType" preserve="all" /> | ||
</assembly> | ||
</linker> |
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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<linker> | ||
<assembly fullname="mscorlib"> | ||
<type fullname="Mono.MonoNativePlatform" preserve="all" /> | ||
<type fullname="Mono.MonoNativePlatformType" preserve="all" /> | ||
</assembly> | ||
</linker> |
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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<linker> | ||
<assembly fullname="mscorlib"> | ||
<type fullname="Mono.MonoNativePlatform" preserve="all" /> | ||
<type fullname="Mono.MonoNativePlatformType" preserve="all" /> | ||
</assembly> | ||
</linker> |
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
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
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
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
Oops, something went wrong.