-
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.
Move parts of dontlink tests into new introspection tests (#32)
Those tests needs to be run with the linker disabled since they use reflection for most of their work. The original dontlink (for linker tests) was becoming too large in some configuration (e.g. tvOS release with bitcode) but this was due to other BCL assemblies (not the introspection tests)
- Loading branch information
Showing
57 changed files
with
9,138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ bin | |
obj | ||
packages | ||
~.pmcs* | ||
.DS_Store |
Large diffs are not rendered by default.
Oops, something went wrong.
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,54 @@ | ||
using System; | ||
#if XAMCORE_2_0 | ||
using AppKit; | ||
using Foundation; | ||
#else | ||
using MonoMac.AppKit; | ||
using MonoMac.Foundation; | ||
#endif | ||
using GuiUnit; | ||
using NUnit.Framework; | ||
|
||
namespace Xamarin.Mac.Tests | ||
{ | ||
static class MainClass | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
NSApplication.Init(); | ||
NSRunLoop.Main.InvokeOnMainThread(RunTests); | ||
NSApplication.Main(args); | ||
} | ||
|
||
static void RunTests() | ||
{ | ||
TestRunner.MainLoop = new NSRunLoopIntegration(); | ||
TestRunner.Main(new[] { | ||
typeof(MainClass).Assembly.Location, | ||
"-labels", | ||
"-noheader" | ||
}); | ||
} | ||
|
||
class NSRunLoopIntegration : NSObject, IMainLoopIntegration | ||
{ | ||
public void InitializeToolkit () | ||
{ | ||
} | ||
|
||
public void RunMainLoop () | ||
{ | ||
} | ||
|
||
public void InvokeOnMainLoop (InvokerHelper helper) | ||
{ | ||
NSApplication.SharedApplication.InvokeOnMainThread (helper.Invoke); | ||
} | ||
|
||
public void Shutdown () | ||
{ | ||
Environment.Exit (TestRunner.ExitCode); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.