diff --git a/src/ObjCRuntime/ErrorHelper.cs b/src/ObjCRuntime/ErrorHelper.cs
index 2b73157abf..ae5ba27749 100644
--- a/src/ObjCRuntime/ErrorHelper.cs
+++ b/src/ObjCRuntime/ErrorHelper.cs
@@ -4,33 +4,23 @@ using System;
using System.Collections.Generic;
#if MONOTOUCH
-#if MTOUCH
+#if MTOUCH || MTOUCH_TESTS
using ProductException=Xamarin.Bundler.MonoTouchException;
#else
-#if XAMCORE_2_0
using ProductException=ObjCRuntime.RuntimeException;
-#else
-using ProductException=MonoTouch.RuntimeException;
-#endif
#endif
#elif MONOMAC
-#if MMP
+#if MMP || MMP_TEST
using ProductException=Xamarin.Bundler.MonoMacException;
#else
-#if XAMCORE_2_0
using ProductException=ObjCRuntime.RuntimeException;
-#else
-using ProductException=MonoMac.RuntimeException;
-#endif
#endif
#else
#error Only supports XI or XM
#endif
-#if !MTOUCH && !MMP
-#if XAMCORE_2_0
+#if !MTOUCH && !MMP && !MTOUCH_TESTS && !MMP_TEST
using ObjCRuntime;
-#endif
#else
using System.Linq;
using Mono.Cecil.Cil;
diff --git a/src/ObjCRuntime/RuntimeException.cs b/src/ObjCRuntime/RuntimeException.cs
index 783f53ace0..54e89e2339 100644
--- a/src/ObjCRuntime/RuntimeException.cs
+++ b/src/ObjCRuntime/RuntimeException.cs
@@ -3,9 +3,7 @@
using System;
using System.Collections.Generic;
-#if XAMCORE_2_0
namespace ObjCRuntime {
-#endif
public class RuntimeException : Exception {
public RuntimeException (string message, params object[] args)
@@ -43,6 +41,4 @@ namespace ObjCRuntime {
}
*/
}
-#if XAMCORE_2_0
}
-#endif
diff --git a/src/System.Net.Http/CFContentStream.cs b/src/System.Net.Http/CFContentStream.cs
index 6b671f018f..338a910f9c 100644
--- a/src/System.Net.Http/CFContentStream.cs
+++ b/src/System.Net.Http/CFContentStream.cs
@@ -35,12 +35,9 @@ using System.Runtime.ExceptionServices;
#if XAMCORE_4_0
using CFNetwork;
using CoreFoundation;
-#elif XAMCORE_2_0 || SYSTEM_NET_HTTP
+#else
using CoreServices;
using CoreFoundation;
-#else
-using MonoTouch.CoreServices;
-using MonoTouch.CoreFoundation;
#endif
namespace System.Net.Http
diff --git a/tests/BundledResources/BundledResources.csproj b/tests/BundledResources/BundledResources.csproj
index fe7a4f1e0b..4fa01e3f70 100644
--- a/tests/BundledResources/BundledResources.csproj
+++ b/tests/BundledResources/BundledResources.csproj
@@ -13,7 +13,7 @@
BundledResources
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/BundledResources/ResourcesTest.cs b/tests/BundledResources/ResourcesTest.cs
index 5bd5d98fd2..c0a787c5f0 100644
--- a/tests/BundledResources/ResourcesTest.cs
+++ b/tests/BundledResources/ResourcesTest.cs
@@ -11,13 +11,8 @@ using System;
using System.IO;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace BundledResources {
diff --git a/tests/EmbeddedResources/EmbeddedResources.csproj b/tests/EmbeddedResources/EmbeddedResources.csproj
index 9674be4557..c834165015 100644
--- a/tests/EmbeddedResources/EmbeddedResources.csproj
+++ b/tests/EmbeddedResources/EmbeddedResources.csproj
@@ -15,7 +15,7 @@
..\..\product.snk
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/EmbeddedResources/ResourcesTest.cs b/tests/EmbeddedResources/ResourcesTest.cs
index 57dc406189..2d6446f2be 100644
--- a/tests/EmbeddedResources/ResourcesTest.cs
+++ b/tests/EmbeddedResources/ResourcesTest.cs
@@ -15,13 +15,8 @@ using System.Reflection;
using System.Reflection.Emit;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace EmbeddedResources {
diff --git a/tests/api-shared/CoreFoundation/CFNotificationCenterTest.cs b/tests/api-shared/CoreFoundation/CFNotificationCenterTest.cs
index c828af905e..f19059a9a8 100644
--- a/tests/api-shared/CoreFoundation/CFNotificationCenterTest.cs
+++ b/tests/api-shared/CoreFoundation/CFNotificationCenterTest.cs
@@ -10,18 +10,8 @@
using System;
using System.Net;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
-#else
-#if MONOMAC
-using MonoMac.CoreFoundation;
-using MonoMac.Foundation;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-#endif
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation
diff --git a/tests/api-shared/ObjCRuntime/Registrar.cs b/tests/api-shared/ObjCRuntime/Registrar.cs
index 5d4ee299cf..9b6725780e 100644
--- a/tests/api-shared/ObjCRuntime/Registrar.cs
+++ b/tests/api-shared/ObjCRuntime/Registrar.cs
@@ -11,16 +11,8 @@ using System;
using System.Reflection;
using System.Runtime.InteropServices;
-#if __UNIFIED__
using Foundation;
using ObjCRuntime;
-#elif __IOS__
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
namespace XamarinTests.ObjCRuntime {
diff --git a/tests/api-shared/ObjCRuntime/RegistrarTest.cs b/tests/api-shared/ObjCRuntime/RegistrarTest.cs
index f8dd544a54..0263943a27 100644
--- a/tests/api-shared/ObjCRuntime/RegistrarTest.cs
+++ b/tests/api-shared/ObjCRuntime/RegistrarTest.cs
@@ -11,16 +11,8 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif __IOS__
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace XamarinTests.ObjCRuntime {
@@ -32,7 +24,6 @@ namespace XamarinTests.ObjCRuntime {
}
}
-#if __UNIFIED__
[Test]
public void IntPtrCtor ()
{
@@ -52,7 +43,6 @@ namespace XamarinTests.ObjCRuntime {
Messaging.void_objc_msgSend (ptr, Selector.GetHandle ("release"));
}
}
-#endif
[Register ("IntPtrCtorTestClass")]
class IntPtrCtorTestClass : NSObject {
diff --git a/tests/apitest/apitest.csproj b/tests/apitest/apitest.csproj
index 9e7cfea3a4..460153a225 100644
--- a/tests/apitest/apitest.csproj
+++ b/tests/apitest/apitest.csproj
@@ -13,7 +13,7 @@
obj\$(Platform)\$(Configuration)
Xamarin.Mac
x86_64
- XAMCORE_2_0
+
true
diff --git a/tests/apitest/src/AVFoundation/AVAudioIONode.cs b/tests/apitest/src/AVFoundation/AVAudioIONode.cs
index f31e4fab8e..af9d2528b3 100644
--- a/tests/apitest/src/AVFoundation/AVAudioIONode.cs
+++ b/tests/apitest/src/AVFoundation/AVAudioIONode.cs
@@ -1,19 +1,11 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.AudioUnit;
-using MonoMac.AVFoundation;
-using AUUnit = MonoMac.AudioUnit.AudioUnit;
-#else
using AppKit;
using Foundation;
using AudioUnit;
using AUUnit = AudioUnit.AudioUnit;
using AVFoundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AVFoundation/AVPlayerLayerTest.cs b/tests/apitest/src/AVFoundation/AVPlayerLayerTest.cs
index 4525a52274..a5f3b07b83 100644
--- a/tests/apitest/src/AVFoundation/AVPlayerLayerTest.cs
+++ b/tests/apitest/src/AVFoundation/AVPlayerLayerTest.cs
@@ -1,18 +1,11 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.AudioUnit;
-using MonoMac.AVFoundation;
-#else
using AppKit;
using Foundation;
using AudioUnit;
using AVFoundation;
using AUUnit = AudioUnit.AudioUnit;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -23,11 +16,7 @@ namespace Xamarin.Mac.Tests
public void AVPlayerLayer_VideoGravity ()
{
AVPlayerLayer layer = new AVPlayerLayer ();
-#if XAMCORE_2_0
Assert.IsNotNull (layer.VideoGravity);
-#else
- Assert.IsNotNull (layer.LayerVideoGravity);
-#endif
}
}
}
\ No newline at end of file
diff --git a/tests/apitest/src/AppKit/NSAppearance.cs b/tests/apitest/src/AppKit/NSAppearance.cs
index 9768988a9c..2c4f6f04f3 100644
--- a/tests/apitest/src/AppKit/NSAppearance.cs
+++ b/tests/apitest/src/AppKit/NSAppearance.cs
@@ -1,16 +1,9 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using nfloat = System.Single;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -55,7 +48,6 @@ namespace Xamarin.Mac.Tests
Assert.AreNotEqual (appearance, NSAppearance.CurrentAppearance, "NSAppearanceShouldChangeCurrentAppearance - Failed to change appearance.");
}
-#if XAMCORE_2_0
[Test]
public void NSAppearanceCustomizationNull ()
{
@@ -64,6 +56,5 @@ namespace Xamarin.Mac.Tests
using (NSButton b = new NSButton ())
b.SetAppearance (null);
}
-#endif
}
}
\ No newline at end of file
diff --git a/tests/apitest/src/AppKit/NSApplication.cs b/tests/apitest/src/AppKit/NSApplication.cs
index 80f661476a..884a4d222f 100644
--- a/tests/apitest/src/AppKit/NSApplication.cs
+++ b/tests/apitest/src/AppKit/NSApplication.cs
@@ -1,15 +1,9 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSCellTest.cs b/tests/apitest/src/AppKit/NSCellTest.cs
index fb8e947132..d21bb8f981 100644
--- a/tests/apitest/src/AppKit/NSCellTest.cs
+++ b/tests/apitest/src/AppKit/NSCellTest.cs
@@ -1,15 +1,9 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using AppKit;
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/apitest/src/AppKit/NSClipView.cs b/tests/apitest/src/AppKit/NSClipView.cs
index ee77bdd975..8538da8414 100644
--- a/tests/apitest/src/AppKit/NSClipView.cs
+++ b/tests/apitest/src/AppKit/NSClipView.cs
@@ -1,15 +1,9 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using CoreGraphics;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSColor.cs b/tests/apitest/src/AppKit/NSColor.cs
index 95b8a4603e..8edeeb2c57 100644
--- a/tests/apitest/src/AppKit/NSColor.cs
+++ b/tests/apitest/src/AppKit/NSColor.cs
@@ -2,12 +2,7 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using nfloat = System.Single;
-#else
using AppKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSControl.cs b/tests/apitest/src/AppKit/NSControl.cs
index 46b8063cb5..6917903490 100644
--- a/tests/apitest/src/AppKit/NSControl.cs
+++ b/tests/apitest/src/AppKit/NSControl.cs
@@ -1,13 +1,8 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-#else
using AppKit;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSDraggingItem.cs b/tests/apitest/src/AppKit/NSDraggingItem.cs
index c5f962a474..a598cef7d4 100644
--- a/tests/apitest/src/AppKit/NSDraggingItem.cs
+++ b/tests/apitest/src/AppKit/NSDraggingItem.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSFont.cs b/tests/apitest/src/AppKit/NSFont.cs
index bea5915256..0e40c35124 100644
--- a/tests/apitest/src/AppKit/NSFont.cs
+++ b/tests/apitest/src/AppKit/NSFont.cs
@@ -1,19 +1,11 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.CoreText;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
using CoreText;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSGradient.cs b/tests/apitest/src/AppKit/NSGradient.cs
index f6377670d6..229a295033 100644
--- a/tests/apitest/src/AppKit/NSGradient.cs
+++ b/tests/apitest/src/AppKit/NSGradient.cs
@@ -1,14 +1,8 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using nfloat = System.Single;
-#else
using AppKit;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSImage.cs b/tests/apitest/src/AppKit/NSImage.cs
index 0116836a27..16fb4b56c4 100644
--- a/tests/apitest/src/AppKit/NSImage.cs
+++ b/tests/apitest/src/AppKit/NSImage.cs
@@ -1,15 +1,9 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using CGSize = System.Drawing.SizeF;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-#else
using AppKit;
using CoreGraphics;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSLayoutManagerTests.cs b/tests/apitest/src/AppKit/NSLayoutManagerTests.cs
index 20b03d9c93..d43128fde5 100644
--- a/tests/apitest/src/AppKit/NSLayoutManagerTests.cs
+++ b/tests/apitest/src/AppKit/NSLayoutManagerTests.cs
@@ -1,18 +1,10 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using CGPoint = System.Drawing.PointF;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSOpenGLPixelFormat.cs b/tests/apitest/src/AppKit/NSOpenGLPixelFormat.cs
index aeb4304c57..0d72e533ba 100644
--- a/tests/apitest/src/AppKit/NSOpenGLPixelFormat.cs
+++ b/tests/apitest/src/AppKit/NSOpenGLPixelFormat.cs
@@ -1,11 +1,7 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-#else
using AppKit;
-#endif
namespace Xamarin.Mac.Tests {
[TestFixture]
diff --git a/tests/apitest/src/AppKit/NSOutlineView.cs b/tests/apitest/src/AppKit/NSOutlineView.cs
index f8ae104509..709526759f 100644
--- a/tests/apitest/src/AppKit/NSOutlineView.cs
+++ b/tests/apitest/src/AppKit/NSOutlineView.cs
@@ -2,13 +2,8 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#else
using AppKit;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -20,11 +15,7 @@ namespace Xamarin.Mac.Tests
{
NSOutlineView v = new NSOutlineView ();
v.BeginUpdates (); // We do this to prevent a crash: Insert/remove/move only works within a -beginUpdates/-endUpdates block or a View Based TableView
-#if !XAMCORE_2_0
- v.InsertItems (new NSIndexSet (0), null, NSTableViewAnimationOptions.EffectFade);
-#else
v.InsertItems (new NSIndexSet (0), null, NSTableViewAnimation.None);
-#endif
v.EndUpdates ();
}
diff --git a/tests/apitest/src/AppKit/NSPasteboard.cs b/tests/apitest/src/AppKit/NSPasteboard.cs
index e88c664d11..29014421b9 100644
--- a/tests/apitest/src/AppKit/NSPasteboard.cs
+++ b/tests/apitest/src/AppKit/NSPasteboard.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -22,10 +16,6 @@ namespace Xamarin.Mac.Tests
NSPasteboard b = NSPasteboard.CreateWithUniqueName();
b.WriteObjects (new INSPasteboardWriting [] { (NSString)"asfd" });
b.WriteObjects (new NSPasteboardWriting [] { new MyPasteboard () });
-#if !XAMCORE_2_0
- // Awesome backwards compat API
- b.WriteObjects (new NSPasteboardReading [] { new MyPasteboard2 () });
-#endif
}
class MyPasteboard2 : NSPasteboardReading
diff --git a/tests/apitest/src/AppKit/NSPathControl.cs b/tests/apitest/src/AppKit/NSPathControl.cs
index f1e18b3082..ef62081cbc 100644
--- a/tests/apitest/src/AppKit/NSPathControl.cs
+++ b/tests/apitest/src/AppKit/NSPathControl.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSPathControlItem.cs b/tests/apitest/src/AppKit/NSPathControlItem.cs
index bd459ad543..ea9a5854b7 100644
--- a/tests/apitest/src/AppKit/NSPathControlItem.cs
+++ b/tests/apitest/src/AppKit/NSPathControlItem.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSScreen.cs b/tests/apitest/src/AppKit/NSScreen.cs
index 81b40a04af..66925658f6 100644
--- a/tests/apitest/src/AppKit/NSScreen.cs
+++ b/tests/apitest/src/AppKit/NSScreen.cs
@@ -2,15 +2,9 @@
using System;
using System.Threading;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSSearchField.cs b/tests/apitest/src/AppKit/NSSearchField.cs
index 9d16c3da3c..da0e15668e 100644
--- a/tests/apitest/src/AppKit/NSSearchField.cs
+++ b/tests/apitest/src/AppKit/NSSearchField.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSSlider.cs b/tests/apitest/src/AppKit/NSSlider.cs
index c8c1e57052..58651629ec 100644
--- a/tests/apitest/src/AppKit/NSSlider.cs
+++ b/tests/apitest/src/AppKit/NSSlider.cs
@@ -1,15 +1,9 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSSplitViewController.cs b/tests/apitest/src/AppKit/NSSplitViewController.cs
index 458349a88c..a0f1115d1c 100644
--- a/tests/apitest/src/AppKit/NSSplitViewController.cs
+++ b/tests/apitest/src/AppKit/NSSplitViewController.cs
@@ -2,17 +2,9 @@
using NUnit.Framework;
using System.Linq;
-#if !XAMCORE_2_0
-using System.Drawing;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSSplitViewItem.cs b/tests/apitest/src/AppKit/NSSplitViewItem.cs
index b58497a000..3191228599 100644
--- a/tests/apitest/src/AppKit/NSSplitViewItem.cs
+++ b/tests/apitest/src/AppKit/NSSplitViewItem.cs
@@ -2,17 +2,9 @@
using NUnit.Framework;
using System.Linq;
-#if !XAMCORE_2_0
-using System.Drawing;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSStackView.cs b/tests/apitest/src/AppKit/NSStackView.cs
index 85f29b5d68..a4ed6786d8 100644
--- a/tests/apitest/src/AppKit/NSStackView.cs
+++ b/tests/apitest/src/AppKit/NSStackView.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSStepperCell.cs b/tests/apitest/src/AppKit/NSStepperCell.cs
index 54d9a059c0..af71767546 100644
--- a/tests/apitest/src/AppKit/NSStepperCell.cs
+++ b/tests/apitest/src/AppKit/NSStepperCell.cs
@@ -1,11 +1,7 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-#else
using AppKit;
-#endif
namespace apitest
{
diff --git a/tests/apitest/src/AppKit/NSStoryboardSegue.cs b/tests/apitest/src/AppKit/NSStoryboardSegue.cs
index a547f598e2..6eb6a22267 100644
--- a/tests/apitest/src/AppKit/NSStoryboardSegue.cs
+++ b/tests/apitest/src/AppKit/NSStoryboardSegue.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTabViewController.cs b/tests/apitest/src/AppKit/NSTabViewController.cs
index 4c388d5c41..53eb1a5342 100644
--- a/tests/apitest/src/AppKit/NSTabViewController.cs
+++ b/tests/apitest/src/AppKit/NSTabViewController.cs
@@ -2,17 +2,9 @@
using NUnit.Framework;
using System.Linq;
-#if !XAMCORE_2_0
-using System.Drawing;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTabViewItem.cs b/tests/apitest/src/AppKit/NSTabViewItem.cs
index e4ed6bd785..9c91f77e06 100644
--- a/tests/apitest/src/AppKit/NSTabViewItem.cs
+++ b/tests/apitest/src/AppKit/NSTabViewItem.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTableColumn.cs b/tests/apitest/src/AppKit/NSTableColumn.cs
index a13fa483fd..0efdbbc34e 100644
--- a/tests/apitest/src/AppKit/NSTableColumn.cs
+++ b/tests/apitest/src/AppKit/NSTableColumn.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTableRowView.cs b/tests/apitest/src/AppKit/NSTableRowView.cs
index a03b012ee1..75896df5c1 100644
--- a/tests/apitest/src/AppKit/NSTableRowView.cs
+++ b/tests/apitest/src/AppKit/NSTableRowView.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTableView.cs b/tests/apitest/src/AppKit/NSTableView.cs
index db3477ec6a..8ab0d78242 100644
--- a/tests/apitest/src/AppKit/NSTableView.cs
+++ b/tests/apitest/src/AppKit/NSTableView.cs
@@ -2,13 +2,8 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#else
using AppKit;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTextField.cs b/tests/apitest/src/AppKit/NSTextField.cs
index 391f4eb3c1..6ecf7278bd 100644
--- a/tests/apitest/src/AppKit/NSTextField.cs
+++ b/tests/apitest/src/AppKit/NSTextField.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTextFinder.cs b/tests/apitest/src/AppKit/NSTextFinder.cs
index 4bca3e89f0..71c2af467a 100644
--- a/tests/apitest/src/AppKit/NSTextFinder.cs
+++ b/tests/apitest/src/AppKit/NSTextFinder.cs
@@ -2,18 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.AudioUnit;
-using MonoMac.AudioToolbox;
-using MonoMac.Foundation;
-using nuint = System.UInt32;
-#else
using AppKit;
using AudioUnit;
using AudioToolbox;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSTextInputClient.cs b/tests/apitest/src/AppKit/NSTextInputClient.cs
index 410710236f..c84ba6b51b 100644
--- a/tests/apitest/src/AppKit/NSTextInputClient.cs
+++ b/tests/apitest/src/AppKit/NSTextInputClient.cs
@@ -1,16 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using CGPoint = System.Drawing.PointF;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using CoreGraphics;
using Foundation;
-#endif
namespace apitest
{
diff --git a/tests/apitest/src/AppKit/NSTextView.cs b/tests/apitest/src/AppKit/NSTextView.cs
index 94ea69c060..4ceb7e6077 100644
--- a/tests/apitest/src/AppKit/NSTextView.cs
+++ b/tests/apitest/src/AppKit/NSTextView.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSToolbar.cs b/tests/apitest/src/AppKit/NSToolbar.cs
index 9b6ecbcaff..1a1f138bd4 100644
--- a/tests/apitest/src/AppKit/NSToolbar.cs
+++ b/tests/apitest/src/AppKit/NSToolbar.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSToolbarItem.cs b/tests/apitest/src/AppKit/NSToolbarItem.cs
index 9585237511..db01c4702c 100644
--- a/tests/apitest/src/AppKit/NSToolbarItem.cs
+++ b/tests/apitest/src/AppKit/NSToolbarItem.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSUserDefaultsController.cs b/tests/apitest/src/AppKit/NSUserDefaultsController.cs
index 04ca2ae69f..a46f4091aa 100644
--- a/tests/apitest/src/AppKit/NSUserDefaultsController.cs
+++ b/tests/apitest/src/AppKit/NSUserDefaultsController.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSView.cs b/tests/apitest/src/AppKit/NSView.cs
index 176eb283fb..f394bf83ec 100644
--- a/tests/apitest/src/AppKit/NSView.cs
+++ b/tests/apitest/src/AppKit/NSView.cs
@@ -3,15 +3,9 @@ using System.Collections.Generic;
using System.Reflection;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -86,7 +80,6 @@ namespace Xamarin.Mac.Tests
NSStatusBar.SystemStatusBar.CreateStatusItem (10).Menu = null;
}
-#if XAMCORE_2_0
[Test]
public void SubviewSort ()
{
@@ -134,6 +127,5 @@ namespace Xamarin.Mac.Tests
}
}
}
-#endif
}
}
diff --git a/tests/apitest/src/AppKit/NSViewController.cs b/tests/apitest/src/AppKit/NSViewController.cs
index ef791df709..8a6f4a8b76 100644
--- a/tests/apitest/src/AppKit/NSViewController.cs
+++ b/tests/apitest/src/AppKit/NSViewController.cs
@@ -1,16 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using System.Drawing;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSVisualEffectView.cs b/tests/apitest/src/AppKit/NSVisualEffectView.cs
index d3c66251e6..ce287bc16d 100644
--- a/tests/apitest/src/AppKit/NSVisualEffectView.cs
+++ b/tests/apitest/src/AppKit/NSVisualEffectView.cs
@@ -1,15 +1,9 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSWindowController.cs b/tests/apitest/src/AppKit/NSWindowController.cs
index 91ec5232b7..8a83f4fbe8 100644
--- a/tests/apitest/src/AppKit/NSWindowController.cs
+++ b/tests/apitest/src/AppKit/NSWindowController.cs
@@ -3,15 +3,9 @@ using System.Collections.Generic;
using System.Reflection;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AppKit/NSWorkspace.cs b/tests/apitest/src/AppKit/NSWorkspace.cs
index 36748d33dd..5f189f0b99 100644
--- a/tests/apitest/src/AppKit/NSWorkspace.cs
+++ b/tests/apitest/src/AppKit/NSWorkspace.cs
@@ -1,13 +1,8 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-#else
using AppKit;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/Asserts.cs b/tests/apitest/src/Asserts.cs
index 92b20c99c6..70453c242b 100644
--- a/tests/apitest/src/Asserts.cs
+++ b/tests/apitest/src/Asserts.cs
@@ -4,13 +4,8 @@ using System.Reflection;
using NUnit.Framework;
using Xamarin.Tests;
-#if !XAMCORE_2_0
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
using ObjCRuntime;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/AudioUnit/AUGraphTest.cs b/tests/apitest/src/AudioUnit/AUGraphTest.cs
index b0b5fa1862..a39ba40563 100644
--- a/tests/apitest/src/AudioUnit/AUGraphTest.cs
+++ b/tests/apitest/src/AudioUnit/AUGraphTest.cs
@@ -2,15 +2,9 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.AudioUnit;
-using MonoMac.AudioToolbox;
-#else
using AppKit;
using AudioUnit;
using AudioToolbox;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -20,11 +14,7 @@ namespace Xamarin.Mac.Tests
int graphRenderCallbackCount = 0;
int mixerRenderCallbackCount = 0;
AUGraph graph;
-#if XAMCORE_2_0
AudioUnit.AudioUnit mMixer;
-#else
- AudioUnit mMixer;
-#endif
void SetupAUGraph ()
{
@@ -73,15 +63,6 @@ namespace Xamarin.Mac.Tests
await WaitOnGraphAndMixerCallbacks ();
}
-#if !XAMCORE_2_0
-#pragma warning disable 0612
- void HandleRenderCallback (object sender, AudioGraphEventArgs e)
- {
- graphRenderCallbackCount++;
- }
-#pragma warning restore 0612
-#endif
-
AudioUnitStatus GraphRenderCallback (AudioUnitRenderActionFlags actionFlags, AudioTimeStamp timeStamp, uint busNumber, uint numberFrames, AudioBuffers data)
{
graphRenderCallbackCount++;
diff --git a/tests/apitest/src/AudioUnit/AudioUnit.cs b/tests/apitest/src/AudioUnit/AudioUnit.cs
index b46f8b43da..9beca160f5 100644
--- a/tests/apitest/src/AudioUnit/AudioUnit.cs
+++ b/tests/apitest/src/AudioUnit/AudioUnit.cs
@@ -2,17 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.AudioUnit;
-using theUnit = MonoMac.AudioUnit.AudioUnit; // Namespace fun
-#else
using AppKit;
using AudioUnit;
using theUnit = AudioUnit.AudioUnit;
-#endif
-
namespace Xamarin.Mac.Tests
{
[TestFixture]
diff --git a/tests/apitest/src/CoreAnimation/CABasicAnimation.cs b/tests/apitest/src/CoreAnimation/CABasicAnimation.cs
index 2383b79cb4..b7508cf368 100644
--- a/tests/apitest/src/CoreAnimation/CABasicAnimation.cs
+++ b/tests/apitest/src/CoreAnimation/CABasicAnimation.cs
@@ -2,18 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreGraphics;
-using MonoMac.Foundation;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using CoreAnimation;
using CoreGraphics;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/CoreAnimation/CAKeyFrameAnimation.cs b/tests/apitest/src/CoreAnimation/CAKeyFrameAnimation.cs
index 3bb6562964..aee027afa3 100644
--- a/tests/apitest/src/CoreAnimation/CAKeyFrameAnimation.cs
+++ b/tests/apitest/src/CoreAnimation/CAKeyFrameAnimation.cs
@@ -2,18 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreGraphics;
-using MonoMac.Foundation;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using CoreAnimation;
using CoreGraphics;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/CoreAnimation/CALayer.cs b/tests/apitest/src/CoreAnimation/CALayer.cs
index 1583bca212..415b3d6968 100644
--- a/tests/apitest/src/CoreAnimation/CALayer.cs
+++ b/tests/apitest/src/CoreAnimation/CALayer.cs
@@ -2,18 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreGraphics;
-using MonoMac.Foundation;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using CoreAnimation;
using CoreGraphics;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/CoreAnimation/CAOpenGLLayer.cs b/tests/apitest/src/CoreAnimation/CAOpenGLLayer.cs
index 083343a290..1e799927ce 100644
--- a/tests/apitest/src/CoreAnimation/CAOpenGLLayer.cs
+++ b/tests/apitest/src/CoreAnimation/CAOpenGLLayer.cs
@@ -1,19 +1,11 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreAnimation;
-using MonoMac.OpenGL;
-using MonoMac.ObjCRuntime;
-#else
using AppKit;
using Foundation;
using CoreAnimation;
using OpenGL;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/CoreImage/CIFilter.cs b/tests/apitest/src/CoreImage/CIFilter.cs
index caee32142e..13e7ed0315 100644
--- a/tests/apitest/src/CoreImage/CIFilter.cs
+++ b/tests/apitest/src/CoreImage/CIFilter.cs
@@ -1,19 +1,10 @@
using NUnit.Framework;
using System;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreImage;
-using MonoMac.CoreGraphics;
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using ObjCRuntime;
using CoreImage;
using CoreGraphics;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/Darwin/KernelNotificationTest.cs b/tests/apitest/src/Darwin/KernelNotificationTest.cs
index 1809955185..4d0cddf67f 100644
--- a/tests/apitest/src/Darwin/KernelNotificationTest.cs
+++ b/tests/apitest/src/Darwin/KernelNotificationTest.cs
@@ -1,11 +1,7 @@
using System;
using System.Diagnostics;
-#if XAMCORE_2_0
using Darwin;
-#else
-using MonoMac.Darwin;
-#endif
using NUnit.Framework;
diff --git a/tests/apitest/src/DelegateAndDataSourceTest.cs b/tests/apitest/src/DelegateAndDataSourceTest.cs
index 12920dd2fd..2a1929ac86 100644
--- a/tests/apitest/src/DelegateAndDataSourceTest.cs
+++ b/tests/apitest/src/DelegateAndDataSourceTest.cs
@@ -5,16 +5,9 @@ using System.Reflection;
using NUnit.Framework;
using System.Runtime.CompilerServices;
-
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using AppKit;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/DerivedEventTest.cs b/tests/apitest/src/DerivedEventTest.cs
index 271c0d441a..ee08ac5a2b 100644
--- a/tests/apitest/src/DerivedEventTest.cs
+++ b/tests/apitest/src/DerivedEventTest.cs
@@ -1,4 +1,3 @@
-#if XAMCORE_2_0
using System;
using System.Collections.Generic;
using System.Linq;
@@ -77,4 +76,3 @@ namespace Xamarin.Mac.Tests
}
}
}
-#endif
\ No newline at end of file
diff --git a/tests/apitest/src/EveryFrameworkSmokeTest.cs b/tests/apitest/src/EveryFrameworkSmokeTest.cs
index 27fc0deee5..079997c740 100644
--- a/tests/apitest/src/EveryFrameworkSmokeTest.cs
+++ b/tests/apitest/src/EveryFrameworkSmokeTest.cs
@@ -7,16 +7,9 @@ using System.Runtime.CompilerServices;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac;
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using AppKit;
using Foundation;
using ObjCRuntime;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/Foundation/AppleScript.cs b/tests/apitest/src/Foundation/AppleScript.cs
index 9b15cd13ba..6cbf647cf1 100644
--- a/tests/apitest/src/Foundation/AppleScript.cs
+++ b/tests/apitest/src/Foundation/AppleScript.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#else
using AppKit;
using Foundation;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/Foundation/NSFormatter.cs b/tests/apitest/src/Foundation/NSFormatter.cs
index c3f7490045..48c84b6da1 100644
--- a/tests/apitest/src/Foundation/NSFormatter.cs
+++ b/tests/apitest/src/Foundation/NSFormatter.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-using MonoMac.AppKit;
-#else
using Foundation;
using AppKit;
-#endif
namespace apitest
{
diff --git a/tests/apitest/src/Foundation/NSIndexSet.cs b/tests/apitest/src/Foundation/NSIndexSet.cs
index 96ab0e5a40..d129635777 100644
--- a/tests/apitest/src/Foundation/NSIndexSet.cs
+++ b/tests/apitest/src/Foundation/NSIndexSet.cs
@@ -2,17 +2,10 @@ using System;
using System.Linq;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using nint = System.Int32;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
-#endif
namespace Xamarin.Mac.Tests
{
@@ -24,10 +17,8 @@ namespace Xamarin.Mac.Tests
{
#pragma warning disable 0219
NSIndexSet a = new NSIndexSet ((int)5);
-#if XAMCORE_2_0
NSIndexSet b = new NSIndexSet ((uint)5);
NSIndexSet c = new NSIndexSet ((nint)5);
-#endif
#pragma warning restore 0219
}
diff --git a/tests/apitest/src/Foundation/NSLayoutConstraint.cs b/tests/apitest/src/Foundation/NSLayoutConstraint.cs
index 8df3b63bee..14eb026447 100644
--- a/tests/apitest/src/Foundation/NSLayoutConstraint.cs
+++ b/tests/apitest/src/Foundation/NSLayoutConstraint.cs
@@ -1,8 +1,4 @@
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-#else
using AppKit;
-#endif
using NUnit.Framework;
namespace Xamarin.Mac.Tests
diff --git a/tests/apitest/src/Foundation/NSMetadataItem.cs b/tests/apitest/src/Foundation/NSMetadataItem.cs
index 4ef43e9642..a1ef897b8e 100644
--- a/tests/apitest/src/Foundation/NSMetadataItem.cs
+++ b/tests/apitest/src/Foundation/NSMetadataItem.cs
@@ -1,10 +1,5 @@
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#else
using AppKit;
using Foundation;
-#endif
using NUnit.Framework;
namespace Xamarin.Mac.Tests {
@@ -25,9 +20,7 @@ namespace Xamarin.Mac.Tests {
Assert.NotNull (mi.FileSystemContentChangeDate, "FileSystemContentChangeDate");
Assert.NotNull (mi.FileSystemCreationDate, "FileSystemCreationDate");
Assert.That (mi.FileSystemName.ToString (), Is.EqualTo ("apitest.app"), "FileSystemName");
-#if XAMCORE_2_0
Assert.That (mi.FileSystemSize.UInt64Value, Is.GreaterThan (0), "FileSystemSize");
-#endif
Assert.False (mi.IsUbiquitous, "IsUbiquitous");
Assert.That (mi.Path.ToString (), Is.StringEnding ("/apitest.app"), "Path");
Assert.False (mi.UbiquitousItemHasUnresolvedConflicts, "UbiquitousItemHasUnresolvedConflicts");
diff --git a/tests/apitest/src/Foundation/NSObject.cs b/tests/apitest/src/Foundation/NSObject.cs
index 764fe7b243..158c81015f 100644
--- a/tests/apitest/src/Foundation/NSObject.cs
+++ b/tests/apitest/src/Foundation/NSObject.cs
@@ -2,17 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using nint = System.Int32;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/Foundation/NSScriptCommandArgumentDescriptionTest.cs b/tests/apitest/src/Foundation/NSScriptCommandArgumentDescriptionTest.cs
index 82895f7a44..dc0a7173e6 100644
--- a/tests/apitest/src/Foundation/NSScriptCommandArgumentDescriptionTest.cs
+++ b/tests/apitest/src/Foundation/NSScriptCommandArgumentDescriptionTest.cs
@@ -1,13 +1,8 @@
// Copyright 2015 Xamarin, Inc.
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/apitest/src/Foundation/NSScriptCommandDescriptionTest.cs b/tests/apitest/src/Foundation/NSScriptCommandDescriptionTest.cs
index 33692bf1eb..66bdba5f83 100644
--- a/tests/apitest/src/Foundation/NSScriptCommandDescriptionTest.cs
+++ b/tests/apitest/src/Foundation/NSScriptCommandDescriptionTest.cs
@@ -3,13 +3,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/apitest/src/Foundation/NSString.cs b/tests/apitest/src/Foundation/NSString.cs
index 22a0341b71..6d409e3938 100644
--- a/tests/apitest/src/Foundation/NSString.cs
+++ b/tests/apitest/src/Foundation/NSString.cs
@@ -1,20 +1,10 @@
using System;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using nuint = System.UInt32;
-using nint = System.Int32;
-using CGRect = System.Drawing.RectangleF;
-using CGSize = System.Drawing.SizeF;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/Foundation/NSThread.cs b/tests/apitest/src/Foundation/NSThread.cs
index 0f0d59f9ba..10b369400c 100644
--- a/tests/apitest/src/Foundation/NSThread.cs
+++ b/tests/apitest/src/Foundation/NSThread.cs
@@ -2,17 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using nint = System.Int32;
-#else
using AppKit;
using ObjCRuntime;
using Foundation;
using CoreGraphics;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/MonoMac/AssemblyTest.cs b/tests/apitest/src/MonoMac/AssemblyTest.cs
index fe9cf7fcbf..3d699aff32 100644
--- a/tests/apitest/src/MonoMac/AssemblyTest.cs
+++ b/tests/apitest/src/MonoMac/AssemblyTest.cs
@@ -9,11 +9,7 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoMac.Foundation;
-#endif
using NUnit.Framework;
namespace MonoMacFixtures {
diff --git a/tests/apitest/src/MonoMac/CBUUID.cs b/tests/apitest/src/MonoMac/CBUUID.cs
index b1ef8618b5..040dce4e39 100644
--- a/tests/apitest/src/MonoMac/CBUUID.cs
+++ b/tests/apitest/src/MonoMac/CBUUID.cs
@@ -9,15 +9,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreBluetooth;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.CoreBluetooth;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
using Xamarin.Mac.Tests;
diff --git a/tests/apitest/src/NSScriptCommandDescriptionDictionaryTest.cs b/tests/apitest/src/NSScriptCommandDescriptionDictionaryTest.cs
index c1283499f9..3ba5de36ea 100644
--- a/tests/apitest/src/NSScriptCommandDescriptionDictionaryTest.cs
+++ b/tests/apitest/src/NSScriptCommandDescriptionDictionaryTest.cs
@@ -4,13 +4,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/apitest/src/ObjCRuntime/ClassTest.cs b/tests/apitest/src/ObjCRuntime/ClassTest.cs
index 89a5ea6ccc..0ed545c458 100644
--- a/tests/apitest/src/ObjCRuntime/ClassTest.cs
+++ b/tests/apitest/src/ObjCRuntime/ClassTest.cs
@@ -10,13 +10,8 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoMacFixtures.ObjCRuntime {
diff --git a/tests/apitest/src/ObjCRuntime/SimpleRegistrarTest.cs b/tests/apitest/src/ObjCRuntime/SimpleRegistrarTest.cs
index c63aa58eb2..0203ef89bb 100644
--- a/tests/apitest/src/ObjCRuntime/SimpleRegistrarTest.cs
+++ b/tests/apitest/src/ObjCRuntime/SimpleRegistrarTest.cs
@@ -2,15 +2,9 @@
using System.Runtime.InteropServices;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-
namespace Xamarin.Mac.Tests
{
[Register ("RegistrarTestClass")]
diff --git a/tests/apitest/src/SceneKit/SCNGeometrySource.cs b/tests/apitest/src/SceneKit/SCNGeometrySource.cs
index 8714154970..396a1ab94c 100644
--- a/tests/apitest/src/SceneKit/SCNGeometrySource.cs
+++ b/tests/apitest/src/SceneKit/SCNGeometrySource.cs
@@ -2,13 +2,8 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-using MonoMac.SceneKit;
-#else
using Foundation;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SceneKit/SCNMaterial.cs b/tests/apitest/src/SceneKit/SCNMaterial.cs
index 9cb425d3a7..f801c539ce 100644
--- a/tests/apitest/src/SceneKit/SCNMaterial.cs
+++ b/tests/apitest/src/SceneKit/SCNMaterial.cs
@@ -2,15 +2,9 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.SceneKit;
-#else
using AppKit;
using Foundation;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SceneKit/SCNNode.cs b/tests/apitest/src/SceneKit/SCNNode.cs
index 56a206a553..ca3d0e798d 100644
--- a/tests/apitest/src/SceneKit/SCNNode.cs
+++ b/tests/apitest/src/SceneKit/SCNNode.cs
@@ -2,17 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreAnimation;
-using MonoMac.SceneKit;
-#else
using AppKit;
using Foundation;
using CoreAnimation;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SceneKit/SCNScene.cs b/tests/apitest/src/SceneKit/SCNScene.cs
index b1b35ad346..67856d8f64 100644
--- a/tests/apitest/src/SceneKit/SCNScene.cs
+++ b/tests/apitest/src/SceneKit/SCNScene.cs
@@ -2,14 +2,8 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-using MonoMac.SceneKit;
-
-#else
using Foundation;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SceneKit/SCNView.cs b/tests/apitest/src/SceneKit/SCNView.cs
index 9828d574e5..8c5c6f2888 100644
--- a/tests/apitest/src/SceneKit/SCNView.cs
+++ b/tests/apitest/src/SceneKit/SCNView.cs
@@ -2,19 +2,11 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreAnimation;
-using MonoMac.SceneKit;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using Foundation;
using CoreAnimation;
using CoreGraphics;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SceneKit/SCNWorld.cs b/tests/apitest/src/SceneKit/SCNWorld.cs
index 18af5764e5..1e3ef6e1f7 100644
--- a/tests/apitest/src/SceneKit/SCNWorld.cs
+++ b/tests/apitest/src/SceneKit/SCNWorld.cs
@@ -2,17 +2,10 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreAnimation;
-using MonoMac.SceneKit;
-#else
using AppKit;
using Foundation;
using CoreAnimation;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SceneKit/SceneKit.cs b/tests/apitest/src/SceneKit/SceneKit.cs
index e15e0865a8..8b1b399954 100644
--- a/tests/apitest/src/SceneKit/SceneKit.cs
+++ b/tests/apitest/src/SceneKit/SceneKit.cs
@@ -2,19 +2,11 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreAnimation;
-using MonoMac.SceneKit;
-using CGRect = System.Drawing.RectangleF;
-#else
using AppKit;
using Foundation;
using CoreAnimation;
using CoreGraphics;
using SceneKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SearchKit/SearchKitTest.cs b/tests/apitest/src/SearchKit/SearchKitTest.cs
index 626fadfc8d..4a6b6b4720 100644
--- a/tests/apitest/src/SearchKit/SearchKitTest.cs
+++ b/tests/apitest/src/SearchKit/SearchKitTest.cs
@@ -4,7 +4,6 @@ using System.Runtime.InteropServices;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using SearchKit;
@@ -158,4 +157,3 @@ namespace apitest {
}
}
}
-#endif
diff --git a/tests/apitest/src/SpriteKit/SKPaymentTests.cs b/tests/apitest/src/SpriteKit/SKPaymentTests.cs
index 5aa414a525..91666649a6 100644
--- a/tests/apitest/src/SpriteKit/SKPaymentTests.cs
+++ b/tests/apitest/src/SpriteKit/SKPaymentTests.cs
@@ -2,16 +2,9 @@ using System;
using System.Threading.Tasks;
using NUnit.Framework;
-#if !XAMCORE_2_0
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.StoreKit;
-using nuint = System.UInt32;
-#else
using AppKit;
using Foundation;
using StoreKit;
-#endif
namespace Xamarin.Mac.Tests
{
diff --git a/tests/apitest/src/SpriteKit/SKScene.cs b/tests/apitest/src/SpriteKit/SKScene.cs
index 1468bff902..5fbd0ffecf 100644
--- a/tests/apitest/src/SpriteKit/SKScene.cs
+++ b/tests/apitest/src/SpriteKit/SKScene.cs
@@ -1,4 +1,3 @@
-#if XAMCORE_2_0
using System;
using System.Threading.Tasks;
using NUnit.Framework;
@@ -49,4 +48,3 @@ namespace Xamarin.Mac.Tests
}
}
}
-#endif
\ No newline at end of file
diff --git a/tests/bindings-framework-test/ApiDefinition.cs b/tests/bindings-framework-test/ApiDefinition.cs
index f51a486920..cf9f0a2081 100644
--- a/tests/bindings-framework-test/ApiDefinition.cs
+++ b/tests/bindings-framework-test/ApiDefinition.cs
@@ -1,22 +1,14 @@
using System;
-#if __UNIFIED__
using ObjCRuntime;
using Foundation;
using UIKit;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace Bindings.Test {
-#if __UNIFIED__
[BaseType (typeof (NSObject))]
public interface FrameworkTest
{
[Export ("func")]
int Func ();
}
-#endif
}
diff --git a/tests/bindings-framework-test/XTest.framework.linkwith.cs b/tests/bindings-framework-test/XTest.framework.linkwith.cs
index 17601048cd..5c74498f8a 100644
--- a/tests/bindings-framework-test/XTest.framework.linkwith.cs
+++ b/tests/bindings-framework-test/XTest.framework.linkwith.cs
@@ -1,16 +1,10 @@
using System;
-#if __UNIFIED__
using ObjCRuntime;
-#else
-using MonoTouch.ObjCRuntime;
-#endif
using System.Runtime.InteropServices;
-#if __UNIFIED__
[assembly: LinkWith ("XTest.framework", Frameworks = LinkWithConstants.Frameworks)]
[assembly: LinkWith ("XStaticObjectTest.framework", LinkerFlags = "-lz", Frameworks = LinkWithConstants.Frameworks)]
[assembly: LinkWith ("XStaticArTest.framework", Frameworks = LinkWithConstants.Frameworks)]
-#endif
static class LinkWithConstants
{
diff --git a/tests/bindings-framework-test/bindings-framework-test.csproj b/tests/bindings-framework-test/bindings-framework-test.csproj
index f1f2aacb26..f240ba91b7 100644
--- a/tests/bindings-framework-test/bindings-framework-test.csproj
+++ b/tests/bindings-framework-test/bindings-framework-test.csproj
@@ -15,7 +15,7 @@
..\..\product.snk
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/bindings-test/ApiDefinition.cs b/tests/bindings-test/ApiDefinition.cs
index d9dff6c1ba..e88a521c6b 100644
--- a/tests/bindings-test/ApiDefinition.cs
+++ b/tests/bindings-test/ApiDefinition.cs
@@ -1,6 +1,5 @@
using System;
-#if __UNIFIED__
using ObjCRuntime;
using Foundation;
#if __MACOS__
@@ -8,17 +7,9 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-#if !__WATCHOS__
-using System.Drawing;
-#endif
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace Bindings.Test {
-#if __UNIFIED__ && FRAMEWORK_TEST
+#if FRAMEWORK_TEST
[BaseType (typeof (NSObject))]
public interface FrameworkTest
{
diff --git a/tests/bindings-test/ApiProtocol.cs b/tests/bindings-test/ApiProtocol.cs
index a4106599ef..73540893a2 100644
--- a/tests/bindings-test/ApiProtocol.cs
+++ b/tests/bindings-test/ApiProtocol.cs
@@ -1,6 +1,5 @@
using System;
-#if __UNIFIED__
using ObjCRuntime;
using Foundation;
#if __MACOS__
@@ -8,14 +7,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-#if !__WATCHOS__
-using System.Drawing;
-#endif
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace Bindings.Test.Protocol {
diff --git a/tests/bindings-test/CodeBehind.cs b/tests/bindings-test/CodeBehind.cs
index 3baab85ab7..431cbff279 100644
--- a/tests/bindings-test/CodeBehind.cs
+++ b/tests/bindings-test/CodeBehind.cs
@@ -1,12 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !__UNIFIED__
-using nint=System.Int32;
-#else
using Foundation;
using ObjCRuntime;
-#endif
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
using MatrixFloat3x3 = global::OpenTK.NMatrix3;
diff --git a/tests/bindings-test/ProtocolTest.cs b/tests/bindings-test/ProtocolTest.cs
index 1b0cad99cd..3529834b16 100644
--- a/tests/bindings-test/ProtocolTest.cs
+++ b/tests/bindings-test/ProtocolTest.cs
@@ -3,13 +3,8 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
-#if __UNIFIED__
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/bindings-test/RegistrarBindingTest.cs b/tests/bindings-test/RegistrarBindingTest.cs
index b4daa9aa25..17fb71e5b4 100644
--- a/tests/bindings-test/RegistrarBindingTest.cs
+++ b/tests/bindings-test/RegistrarBindingTest.cs
@@ -1,13 +1,8 @@
using System;
using System.Threading;
-#if __UNIFIED__
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/bindings-test/RuntimeTest.cs b/tests/bindings-test/RuntimeTest.cs
index 58fd47b365..6989e75f79 100644
--- a/tests/bindings-test/RuntimeTest.cs
+++ b/tests/bindings-test/RuntimeTest.cs
@@ -1,13 +1,8 @@
using System;
using System.Threading;
-#if __UNIFIED__
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/bindings-test/StructsAndEnums.cs b/tests/bindings-test/StructsAndEnums.cs
index d3fb097453..9a429772ae 100644
--- a/tests/bindings-test/StructsAndEnums.cs
+++ b/tests/bindings-test/StructsAndEnums.cs
@@ -1,12 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !__UNIFIED__
-using nint=System.Int32;
-#else
using Foundation;
using ObjCRuntime;
-#endif
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
using MatrixFloat3x3 = global::OpenTK.NMatrix3;
diff --git a/tests/bindings-test/bindings-test.csproj b/tests/bindings-test/bindings-test.csproj
index f47a57060d..9e8730dee7 100644
--- a/tests/bindings-test/bindings-test.csproj
+++ b/tests/bindings-test/bindings-test.csproj
@@ -15,7 +15,7 @@
true
..\..\product.snk
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/bindings-test/libtest.linkwith.cs b/tests/bindings-test/libtest.linkwith.cs
index cee3571832..d62ad2f0ad 100644
--- a/tests/bindings-test/libtest.linkwith.cs
+++ b/tests/bindings-test/libtest.linkwith.cs
@@ -1,9 +1,5 @@
using System;
-#if __UNIFIED__
using ObjCRuntime;
-#else
-using MonoTouch.ObjCRuntime;
-#endif
using System.Runtime.InteropServices;
[assembly: LinkWith ("libtest.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Arm64 | LinkTarget.Simulator64, SmartLink = true, Frameworks = LinkWithConstants.Frameworks, LinkerFlags = "-lz")]
diff --git a/tests/bindings-test2/BindingTest.cs b/tests/bindings-test2/BindingTest.cs
index 43ae1e5377..93155bbfcd 100644
--- a/tests/bindings-test2/BindingTest.cs
+++ b/tests/bindings-test2/BindingTest.cs
@@ -3,13 +3,8 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
-#if __UNIFIED__
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/bindings-test2/bindings-test2.csproj b/tests/bindings-test2/bindings-test2.csproj
index ceb6e73fe7..10f7c28559 100644
--- a/tests/bindings-test2/bindings-test2.csproj
+++ b/tests/bindings-test2/bindings-test2.csproj
@@ -15,7 +15,7 @@
true
..\..\product.snk
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/bindings-test2/libtest2.linkwith.cs b/tests/bindings-test2/libtest2.linkwith.cs
index 724296ac83..512fb292f9 100644
--- a/tests/bindings-test2/libtest2.linkwith.cs
+++ b/tests/bindings-test2/libtest2.linkwith.cs
@@ -1,9 +1,5 @@
using System;
-#if __UNIFIED__
using ObjCRuntime;
-#else
-using MonoTouch.ObjCRuntime;
-#endif
using System.Runtime.InteropServices;
[assembly: LinkWith ("libtest2.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Arm64 | LinkTarget.Simulator64, SmartLink = true, Frameworks = "Foundation" , LinkerFlags = "-lz")]
diff --git a/tests/common.mk b/tests/common.mk
index 80f1485725..6d83bed6a1 100644
--- a/tests/common.mk
+++ b/tests/common.mk
@@ -25,7 +25,7 @@ clean-local::
build/%/$(TESTDLL): $(MAC_SOURCES) build/GuiUnit.exe Makefile $(BASE_DLLS)
@mkdir -p $(dir $@)
- $(Q_CSC) $(SYSTEM_CSC) -out:$@ -t:library -features:strict -debug -d:MONOMAC -d:XAMCORE_2_0 \
+ $(Q_CSC) $(SYSTEM_CSC) -out:$@ -t:library -features:strict -debug -d:MONOMAC \
-r:build/GuiUnit.exe \
-r:$(TOP)/src/build/mac/$*/Xamarin.Mac.dll \
$(MAC_SOURCES)
diff --git a/tests/common/Assert.cs b/tests/common/Assert.cs
index 824d01b581..43c5fb678c 100644
--- a/tests/common/Assert.cs
+++ b/tests/common/Assert.cs
@@ -5,13 +5,8 @@ using System.Resources;
using System.Runtime.InteropServices;
using System.Diagnostics;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using NUnit.Framework.Constraints;
diff --git a/tests/common/PlatformInfo.cs b/tests/common/PlatformInfo.cs
index dd30c8327d..87cd064f74 100644
--- a/tests/common/PlatformInfo.cs
+++ b/tests/common/PlatformInfo.cs
@@ -12,20 +12,11 @@ using System.Linq;
using System.Reflection;
using System.Collections.Generic;
-#if XAMCORE_2_0 || __UNIFIED__
using ObjCRuntime;
using Foundation;
#if !(MONOMAC || __MACOS__)
using UIKit;
#endif
-#elif MONOMAC || __MACOS__
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace Xamarin.Tests
{
diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs
index 11ea339889..ecd78ede90 100644
--- a/tests/common/TestRuntime.cs
+++ b/tests/common/TestRuntime.cs
@@ -1,9 +1,6 @@
#if __MACOS__
#define MONOMAC
#endif
-#if __UNIFIED__
-#define XAMCORE_2_0
-#endif
using System;
using System.Collections.Generic;
@@ -12,7 +9,6 @@ using System.Runtime.InteropServices;
using System.Reflection;
using System.Reflection.Emit;
-#if XAMCORE_2_0
using AVFoundation;
using CoreBluetooth;
using Foundation;
@@ -32,20 +28,6 @@ using MediaPlayer;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using nint=global::System.Int32;
-#if MONOMAC
-using MonoMac;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-using MonoMac.AppKit;
-using MonoMac.AVFoundation;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
-#endif
partial class TestRuntime
{
@@ -789,7 +771,7 @@ partial class TestRuntime
}
#endif // !!MONOMAC && !__TVOS__ && !__WATCHOS__
-#if XAMCORE_2_0 && !__TVOS__
+#if !__TVOS__
public static void CheckContactsPermission (bool assert_granted = false)
{
switch (CNContactStore.GetAuthorizationStatus (CNEntityType.Contacts)) {
@@ -826,7 +808,7 @@ partial class TestRuntime
CheckContactsPermission (assert_granted);
}
-#endif // XAMCORE_2_0
+#endif // !__TVOS__
#if !MONOMAC && !__TVOS__ && !__WATCHOS__
public static void CheckAddressBookPermission (bool assert_granted = false)
@@ -936,7 +918,6 @@ partial class TestRuntime
}
#endif
-#if __UNIFIED__
#if __MACOS__
public static global::CoreGraphics.CGColor GetCGColor (NSColor color)
#else
@@ -954,7 +935,6 @@ partial class TestRuntime
return color.CGColor;
#endif
}
-#endif // __UNIFIED__
// Determine if linkall was enabled by checking if an unused class in this assembly is still here.
static bool? link_all;
diff --git a/tests/common/mac/MacTestMain.cs b/tests/common/mac/MacTestMain.cs
index d327811034..a712788924 100644
--- a/tests/common/mac/MacTestMain.cs
+++ b/tests/common/mac/MacTestMain.cs
@@ -2,13 +2,8 @@ using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
-#if XAMCORE_2_0 || __UNIFIED__
using AppKit;
using Foundation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#endif
using GuiUnit;
using NUnit.Framework;
@@ -114,7 +109,6 @@ namespace Xamarin.Mac.Tests
}
}
-#if XAMCORE_2_0
partial class TestRuntime {
public static bool RunAsync (TimeSpan timeout, Action action, Func check_completed, NSImage imageToShow = null)
{
@@ -133,4 +127,3 @@ partial class TestRuntime {
return true;
}
}
-#endif
diff --git a/tests/common/mac/project_building.mk b/tests/common/mac/project_building.mk
index b78c186443..d358edaec3 100644
--- a/tests/common/mac/project_building.mk
+++ b/tests/common/mac/project_building.mk
@@ -32,4 +32,4 @@ run run-test run-tests:: $(TESTDLL) $(EXTRA_DEPS)
$(TESTDLL): $(ALL_SOURCE_FILES)
$(Q) mkdir -p build
- $(Q) $(SYSTEM_CSC) /debug $(SOURCES) -d:MMP_TEST -d:XAMCORE_2_0 -d:MONOMAC -t:library -r:nunit.framework -features:strict -out:$(TESTDLL)
+ $(Q) $(SYSTEM_CSC) /debug $(SOURCES) -d:MMP_TEST -d:MONOMAC -t:library -r:nunit.framework -features:strict -out:$(TESTDLL)
diff --git a/tests/framework-test/AppDelegate.cs b/tests/framework-test/AppDelegate.cs
index eda3140fea..2349504ffe 100644
--- a/tests/framework-test/AppDelegate.cs
+++ b/tests/framework-test/AppDelegate.cs
@@ -3,13 +3,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
namespace frameworktest
diff --git a/tests/framework-test/FrameworkTests.cs b/tests/framework-test/FrameworkTests.cs
index c30bb9f073..0b29582d67 100644
--- a/tests/framework-test/FrameworkTests.cs
+++ b/tests/framework-test/FrameworkTests.cs
@@ -10,8 +10,6 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
-
using MonoTouch;
using Foundation;
using ObjCRuntime;
@@ -43,5 +41,3 @@ namespace MonoTouchFixtures {
}
}
}
-
-#endif
diff --git a/tests/framework-test/Main.cs b/tests/framework-test/Main.cs
index 87a1a00c8c..dacf8c9c1f 100644
--- a/tests/framework-test/Main.cs
+++ b/tests/framework-test/Main.cs
@@ -3,13 +3,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace frameworktest
{
diff --git a/tests/framework-test/framework-test.csproj b/tests/framework-test/framework-test.csproj
index 4d6c1a5141..32409c0673 100644
--- a/tests/framework-test/framework-test.csproj
+++ b/tests/framework-test/framework-test.csproj
@@ -13,7 +13,7 @@
frameworktest
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/fsharp/AppDelegate.fs b/tests/fsharp/AppDelegate.fs
index 6332cac3e3..c22f56c984 100644
--- a/tests/fsharp/AppDelegate.fs
+++ b/tests/fsharp/AppDelegate.fs
@@ -4,13 +4,8 @@
open System
open System.Reflection
-#if __UNIFIED__
open UIKit
open Foundation
-#else
-open MonoTouch.UIKit
-open MonoTouch.Foundation
-#endif
open MonoTouch.NUnit.UI
diff --git a/tests/fsharp/FSharpTests.fs b/tests/fsharp/FSharpTests.fs
index b666f13184..fae4443013 100644
--- a/tests/fsharp/FSharpTests.fs
+++ b/tests/fsharp/FSharpTests.fs
@@ -3,13 +3,8 @@
open System
open System.Reflection
-#if __UNIFIED__
open UIKit
open Foundation
-#else
-open MonoTouch.UIKit
-open MonoTouch.Foundation
-#endif
open NUnit.Framework
diff --git a/tests/fsharp/Main.fs b/tests/fsharp/Main.fs
index 61ca6adfd0..597dab9f0c 100644
--- a/tests/fsharp/Main.fs
+++ b/tests/fsharp/Main.fs
@@ -1,10 +1,6 @@
namespace Test
-#if __UNIFIED__
open UIKit
-#else
-open MonoTouch.UIKit
-#endif
#if !__WATCHOS__ && !TODAY_EXTENSION
diff --git a/tests/fsharp/fsharp.fsproj b/tests/fsharp/fsharp.fsproj
index 66dc2465f5..c5d6d8c31f 100644
--- a/tests/fsharp/fsharp.fsproj
+++ b/tests/fsharp/fsharp.fsproj
@@ -13,7 +13,7 @@
Resources
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
true
diff --git a/tests/fsharplibrary/ObjCRuntime/RegistrarTest.fs b/tests/fsharplibrary/ObjCRuntime/RegistrarTest.fs
index 28831acb15..274e72820e 100644
--- a/tests/fsharplibrary/ObjCRuntime/RegistrarTest.fs
+++ b/tests/fsharplibrary/ObjCRuntime/RegistrarTest.fs
@@ -1,11 +1,7 @@
namespace MonoTouchFixtures
open System
-#if __UNIFIED__
open Foundation
-#else
-open MonoTouch.Foundation
-#endif
type Registrar_OutExportClass() =
inherit NSObject()
diff --git a/tests/fsharplibrary/fsharplibrary.fsproj b/tests/fsharplibrary/fsharplibrary.fsproj
index b41f8506d1..750930d108 100644
--- a/tests/fsharplibrary/fsharplibrary.fsproj
+++ b/tests/fsharplibrary/fsharplibrary.fsproj
@@ -15,7 +15,7 @@
..\..\product.snk
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
true
diff --git a/tests/generator/NSApplicationPublicEnsureMethods.cs b/tests/generator/NSApplicationPublicEnsureMethods.cs
index 9b0f3e9fc5..f22ddb4483 100644
--- a/tests/generator/NSApplicationPublicEnsureMethods.cs
+++ b/tests/generator/NSApplicationPublicEnsureMethods.cs
@@ -9,13 +9,8 @@
*
*/
using System;
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
namespace Test {
[BaseType (typeof (NSObject), Delegates=new string [] {"WeakDelegate"}, Events=new Type [] {typeof (SharedDelegate)})]
diff --git a/tests/generator/arrayfromhandlebug.cs b/tests/generator/arrayfromhandlebug.cs
index 1de485ac7e..5723945644 100644
--- a/tests/generator/arrayfromhandlebug.cs
+++ b/tests/generator/arrayfromhandlebug.cs
@@ -1,15 +1,7 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
-#else
-using Foundation;
-#endif
namespace AudioUnit {
// @interface AUParameterNode : NSObject
diff --git a/tests/generator/bmac-with-hyphen-in-name.cs b/tests/generator/bmac-with-hyphen-in-name.cs
index 31af3b611d..0ce8269e73 100644
--- a/tests/generator/bmac-with-hyphen-in-name.cs
+++ b/tests/generator/bmac-with-hyphen-in-name.cs
@@ -1,8 +1,4 @@
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
namespace Test
{
diff --git a/tests/generator/bmac_smoke.cs b/tests/generator/bmac_smoke.cs
index 5c73f7a114..ad5ffcfc47 100644
--- a/tests/generator/bmac_smoke.cs
+++ b/tests/generator/bmac_smoke.cs
@@ -1,8 +1,4 @@
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
namespace Test
{
diff --git a/tests/generator/bug31788.cs b/tests/generator/bug31788.cs
index 049ec01322..e4ce387798 100644
--- a/tests/generator/bug31788.cs
+++ b/tests/generator/bug31788.cs
@@ -1,8 +1,4 @@
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
namespace Test
{
diff --git a/tests/generator/bug37527-missing-property.cs b/tests/generator/bug37527-missing-property.cs
index 8d64b2f4dd..7c48c5e62e 100644
--- a/tests/generator/bug37527-missing-property.cs
+++ b/tests/generator/bug37527-missing-property.cs
@@ -3,13 +3,8 @@
*
*/
using System;
-#if !XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test {
[BaseType (typeof (NSObject))]
diff --git a/tests/generator/bug37527-wrong-property.cs b/tests/generator/bug37527-wrong-property.cs
index 6622a26db6..60ca046a93 100644
--- a/tests/generator/bug37527-wrong-property.cs
+++ b/tests/generator/bug37527-wrong-property.cs
@@ -3,13 +3,8 @@
*
*/
using System;
-#if !XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test {
[BaseType (typeof (NSObject))]
diff --git a/tests/generator/classNameCollision-enum.cs b/tests/generator/classNameCollision-enum.cs
index f9281fb9e1..5d2aa1e037 100644
--- a/tests/generator/classNameCollision-enum.cs
+++ b/tests/generator/classNameCollision-enum.cs
@@ -1,15 +1,7 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
-#else
-using Foundation;
-#endif
namespace AudioUnit {
[StructLayout (LayoutKind.Sequential)]
diff --git a/tests/generator/classNameCollision.cs b/tests/generator/classNameCollision.cs
index 06c9c71dbb..10625d2f76 100644
--- a/tests/generator/classNameCollision.cs
+++ b/tests/generator/classNameCollision.cs
@@ -1,15 +1,7 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
-#else
-using Foundation;
-#endif
namespace AudioUnit {
[BaseType (typeof(NSObject))]
diff --git a/tests/generator/nowarn.cs b/tests/generator/nowarn.cs
index a80bb66179..c86c58d4f4 100644
--- a/tests/generator/nowarn.cs
+++ b/tests/generator/nowarn.cs
@@ -1,9 +1,5 @@
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoMac.Foundation;
-#endif
namespace nowarnTests {
diff --git a/tests/generator/property-redefination-ios.cs b/tests/generator/property-redefination-ios.cs
index c37485856f..7fff43c17b 100644
--- a/tests/generator/property-redefination-ios.cs
+++ b/tests/generator/property-redefination-ios.cs
@@ -1,8 +1,4 @@
-#if !XAMCORE_2_0
using Foundation;
-#else
-using Foundation;
-#endif
namespace Test
{
diff --git a/tests/generator/property-redefination-mac.cs b/tests/generator/property-redefination-mac.cs
index 1ef716bd18..fac90e71e8 100644
--- a/tests/generator/property-redefination-mac.cs
+++ b/tests/generator/property-redefination-mac.cs
@@ -1,8 +1,4 @@
-#if !XAMCORE_2_0
-using MonoMac.Foundation;
-#else
using Foundation;
-#endif
namespace Test
{
diff --git a/tests/generator/protocol-duplicate-abstract-error.cs b/tests/generator/protocol-duplicate-abstract-error.cs
index c8e8fefb41..4a7025b57d 100644
--- a/tests/generator/protocol-duplicate-abstract-error.cs
+++ b/tests/generator/protocol-duplicate-abstract-error.cs
@@ -1,18 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/protocol-duplicate-abstract.cs b/tests/generator/protocol-duplicate-abstract.cs
index d707d51fc5..a1f81b483c 100644
--- a/tests/generator/protocol-duplicate-abstract.cs
+++ b/tests/generator/protocol-duplicate-abstract.cs
@@ -1,18 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/protocol-duplicate-method-diff-length.cs b/tests/generator/protocol-duplicate-method-diff-length.cs
index 219d2a0566..a01017761e 100644
--- a/tests/generator/protocol-duplicate-method-diff-length.cs
+++ b/tests/generator/protocol-duplicate-method-diff-length.cs
@@ -1,18 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/protocol-duplicate-method-diff-out.cs b/tests/generator/protocol-duplicate-method-diff-out.cs
index fb05f66733..a3cf5c075a 100644
--- a/tests/generator/protocol-duplicate-method-diff-out.cs
+++ b/tests/generator/protocol-duplicate-method-diff-out.cs
@@ -1,18 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/protocol-duplicate-method-diff-return.cs b/tests/generator/protocol-duplicate-method-diff-return.cs
index db6effae75..422503ee27 100644
--- a/tests/generator/protocol-duplicate-method-diff-return.cs
+++ b/tests/generator/protocol-duplicate-method-diff-return.cs
@@ -1,18 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/protocol-duplicate-method-diff-type.cs b/tests/generator/protocol-duplicate-method-diff-type.cs
index e56cf52c3c..352aa55df8 100644
--- a/tests/generator/protocol-duplicate-method-diff-type.cs
+++ b/tests/generator/protocol-duplicate-method-diff-type.cs
@@ -1,18 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/strong-dict-support-templated-dicts.cs b/tests/generator/strong-dict-support-templated-dicts.cs
index f15e5b3688..14d91bfc4e 100644
--- a/tests/generator/strong-dict-support-templated-dicts.cs
+++ b/tests/generator/strong-dict-support-templated-dicts.cs
@@ -1,15 +1,5 @@
-#if !XAMCORE_2_0
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
using Foundation;
using ObjCRuntime;
-#endif
-#else
-using Foundation;
-using ObjCRuntime;
-#endif
namespace Test
{
diff --git a/tests/generator/warnaserror.cs b/tests/generator/warnaserror.cs
index 2bd85fb084..b39cf7e1b4 100644
--- a/tests/generator/warnaserror.cs
+++ b/tests/generator/warnaserror.cs
@@ -1,10 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoMac.Foundation;
-#endif
namespace warnaserrorTests {
diff --git a/tests/interdependent-binding-projects/interdependent-binding-projects.csproj b/tests/interdependent-binding-projects/interdependent-binding-projects.csproj
index ae39944a54..d8e71a7475 100644
--- a/tests/interdependent-binding-projects/interdependent-binding-projects.csproj
+++ b/tests/interdependent-binding-projects/interdependent-binding-projects.csproj
@@ -13,7 +13,7 @@
True
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
True
diff --git a/tests/introspection/ApiAvailabilityTest.cs b/tests/introspection/ApiAvailabilityTest.cs
index 33806e1e63..14d8400137 100644
--- a/tests/introspection/ApiAvailabilityTest.cs
+++ b/tests/introspection/ApiAvailabilityTest.cs
@@ -19,8 +19,6 @@
// limitations under the License.
//
-#if XAMCORE_2_0
-
using System;
using System.Reflection;
using NUnit.Framework;
@@ -134,6 +132,3 @@ namespace Introspection {
}
}
}
-
-#endif
-
diff --git a/tests/introspection/ApiBaseTest.cs b/tests/introspection/ApiBaseTest.cs
index db9da0ad8c..628ac6dd71 100644
--- a/tests/introspection/ApiBaseTest.cs
+++ b/tests/introspection/ApiBaseTest.cs
@@ -29,21 +29,11 @@ using Xamarin.Utils;
using System.Linq;
using Xamarin.Tests;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOTOUCH
using UIKit;
#endif
-#else
-#if MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
-#endif
namespace Introspection {
diff --git a/tests/introspection/ApiCMAttachmentTest.cs b/tests/introspection/ApiCMAttachmentTest.cs
index db55440829..9835bf946d 100644
--- a/tests/introspection/ApiCMAttachmentTest.cs
+++ b/tests/introspection/ApiCMAttachmentTest.cs
@@ -9,7 +9,6 @@ using System.Security.Cryptography.X509Certificates;
using NUnit.Framework;
-#if XAMCORE_2_0
using AudioToolbox;
using AudioUnit;
using CoreMedia;
@@ -27,23 +26,6 @@ using Security;
using VideoToolbox;
using UIKit;
using Network;
-#else
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreMedia;
-using MonoTouch.CoreFoundation;
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreServices;
-using MonoTouch.CoreText;
-using MonoTouch.CoreVideo;
-using MonoTouch.Foundation;
-using MonoTouch.ImageIO;
-using MonoTouch.SystemConfiguration;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Security;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.Network;
-#endif
namespace Introspection {
diff --git a/tests/introspection/ApiClassPtrTest.cs b/tests/introspection/ApiClassPtrTest.cs
index ce15d0e070..79beef80b3 100644
--- a/tests/introspection/ApiClassPtrTest.cs
+++ b/tests/introspection/ApiClassPtrTest.cs
@@ -14,16 +14,8 @@ using NUnit.Framework;
using Xamarin.Utils;
using System.Runtime.CompilerServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
diff --git a/tests/introspection/ApiCoreImageFiltersTest.cs b/tests/introspection/ApiCoreImageFiltersTest.cs
index 3fd82563f0..1c2887d976 100644
--- a/tests/introspection/ApiCoreImageFiltersTest.cs
+++ b/tests/introspection/ApiCoreImageFiltersTest.cs
@@ -29,22 +29,12 @@ using System.Text;
using NUnit.Framework;
-#if XAMCORE_2_0
using CoreImage;
using Foundation;
using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
-#elif MONOMAC
-using MonoMac.CoreImage;
-using MonoMac.Foundation;
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
namespace Introspection {
diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs
index 8588c5f73b..09271db192 100644
--- a/tests/introspection/ApiCtorInitTest.cs
+++ b/tests/introspection/ApiCtorInitTest.cs
@@ -29,16 +29,8 @@ using NUnit.Framework;
using ARKit;
#endif
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
@@ -62,16 +54,6 @@ namespace Introspection {
if (type.ContainsGenericParameters)
return true;
-#if !XAMCORE_2_0
- // skip delegate (and other protocol references)
- foreach (object ca in type.GetCustomAttributes (false)) {
- if (ca is ProtocolAttribute)
- return true;
- if (ca is ModelAttribute)
- return true;
- }
-#endif
-
switch (type.Name) {
case "JSExport":
// This is interesting: Apple defines a private JSExport class - if you try to define your own in an Objective-C project you get this warning at startup:
@@ -80,11 +62,6 @@ namespace Introspection {
// see that there's an existing JSExport type, and use that one instead of creating a new type.
// This is problematic, because Apple's JSExport is completely unusable, and will crash if you try to do anything.
return true;
-#if !XAMCORE_2_0
- case "AVAssetResourceLoader": // We have DisableDefaultCtor in XAMCORE_2_0 but can't change in compat because of backwards compat
- case "AVAssetResourceLoadingRequest":
- case "AVAssetResourceLoadingContentInformationRequest":
-#endif
// on iOS 8.2 (beta 1) we get: NSInvalidArgumentException Caller did not provide an activityType, and this process does not have a NSUserActivityTypes in its Info.plist.
// even if we specify an NSUserActivityTypes in the Info.plist - might be a bug or there's a new (undocumented) requirement
case "NSUserActivity":
@@ -169,12 +146,8 @@ namespace Introspection {
bool GetIsDirectBinding (NSObject obj)
{
-#if XAMCORE_2_0
int flags = (byte) typeof (NSObject).GetField ("flags", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic).GetValue (obj);
return (flags & 4) == 4;
-#else
- return (bool) typeof (NSObject).GetField ("IsDirectBinding", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic).GetValue (obj);
-#endif
}
///
@@ -343,18 +316,13 @@ namespace Introspection {
protected virtual bool Match (ConstructorInfo ctor, Type type)
{
-#if XAMCORE_2_0
- string foundation_namespace = "Foundation";
-#elif MONOMAC
- string foundation_namespace = "MonoMac.Foundation";
-#else
- string foundation_namespace = "MonoTouch.Foundation";
-#endif
+ var cstr = ctor.ToString ();
+
switch (type.Name) {
case "MKTileOverlayRenderer":
// NSInvalidArgumentEception Expected a MKTileOverlay
// looks like Apple has not yet added a DI for this type, but it should be `initWithTileOverlay:`
- if (ctor.ToString () == $"Void .ctor(MapKit.IMKOverlay)")
+ if (cstr == $"Void .ctor(MapKit.IMKOverlay)")
return true;
break;
case "MPSMatrixMultiplication":
@@ -362,18 +330,18 @@ namespace Introspection {
case "MPSImageHistogram":
// Could not initialize an instance of the type 'MetalPerformanceShaders.MPSImageHistogram': the native 'initWithDevice:' method returned nil.
// make sense: there's a `initWithDevice:histogramInfo:` DI
- if (ctor.ToString () == $"Void .ctor(Metal.IMTLDevice)")
+ if (cstr == $"Void .ctor(Metal.IMTLDevice)")
return true;
break;
case "NSDataDetector":
// -[NSDataDetector initWithPattern:options:error:]: Not valid for NSDataDetector
- if (ctor.ToString () == $"Void .ctor({foundation_namespace}.NSString, {foundation_namespace}.NSRegularExpressionOptions, {foundation_namespace}.NSError ByRef)")
+ if (cstr == $"Void .ctor(Foundation.NSString, Foundation.NSRegularExpressionOptions, Foundation.NSError ByRef)")
return true;
break;
case "SKStoreProductViewController":
case "SKCloudServiceSetupViewController":
// SKStoreProductViewController and SKCloudServiceSetupViewController are OS View Controllers which can't be customized. Therefore they shouldn't re-expose initWithNibName:bundle:
- if (ctor.ToString () == $"Void .ctor(System.String, {foundation_namespace}.NSBundle)")
+ if (cstr == $"Void .ctor(System.String, Foundation.NSBundle)")
return true;
break;
case "MKCompassButton":
@@ -407,20 +375,16 @@ namespace Introspection {
case "PdfAnnotationTextWidget":
// This ctor was introduced in 10,13 but all of the above objects are deprecated in 10,12
// so it does not make much sense to expose this ctor in all the deprecated subclasses
-#if XAMCORE_2_0
- if (ctor.ToString () == $"Void .ctor(CoreGraphics.CGRect, {foundation_namespace}.NSString, {foundation_namespace}.NSDictionary)")
-#else
- if (ctor.ToString () == $"Void .ctor(System.Drawing.RectangleF, {foundation_namespace}.NSString, {foundation_namespace}.NSDictionary)")
-#endif
+ if (cstr == $"Void .ctor(CoreGraphics.CGRect, Foundation.NSString, Foundation.NSDictionary)")
return true;
break;
case "VNTargetedImageRequest": // Explicitly disabled
- if (ctor.ToString () == $"Void .ctor(Vision.VNRequestCompletionHandler)")
+ if (cstr == $"Void .ctor(Vision.VNRequestCompletionHandler)")
return true;
break;
case "PKPaymentRequestShippingContactUpdate":
// a more precise designated initializer is provided
- if (ctor.ToString () == $"Void .ctor(PassKit.PKPaymentSummaryItem[])")
+ if (cstr == $"Void .ctor(PassKit.PKPaymentSummaryItem[])")
return true;
break;
case "NSApplication": // Does not make sense, also it crashes
@@ -430,12 +394,12 @@ namespace Introspection {
case "NSCustomImageRep": // exception raised
case "NSEPSImageRep": // exception raised
case "NSPdfImageRep": // exception raised
- if (ctor.ToString () == $"Void .ctor()")
+ if (cstr == $"Void .ctor()")
return true;
break;
case "AUPannerView": // Do not make sense without the AudioUnit
case "AUGenericView": // Do not make sense without the AudioUnit
- if (ctor.ToString () == $"Void .ctor(CoreGraphics.CGRect)")
+ if (cstr == $"Void .ctor(CoreGraphics.CGRect)")
return true;
break;
case "MDLNoiseTexture":
@@ -450,7 +414,7 @@ namespace Introspection {
case "INUIAddVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor
case "INUIEditVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor
case "ILClassificationUIExtensionViewController": // Meant to be an extension
- if (ctor.ToString () == $"Void .ctor(System.String, {foundation_namespace}.NSBundle)")
+ if (cstr == $"Void .ctor(System.String, Foundation.NSBundle)")
return true;
break;
case "MPSImageReduceUnary": // Not meant to be used, only subclasses
@@ -459,8 +423,7 @@ namespace Introspection {
case "MPSNNOptimizer": // Not meant to be used, only subclasses
case "MPSNNReduceBinary": // Not meant to be used, only subclasses
case "MPSNNReduceUnary": // Not meant to be used, only subclasses
- var cstr = ctor.ToString ();
- if (cstr == "Void .ctor(Metal.IMTLDevice)" || cstr == $"Void .ctor({foundation_namespace}.NSCoder, Metal.IMTLDevice)")
+ if (cstr == "Void .ctor(Metal.IMTLDevice)" || cstr == $"Void .ctor(Foundation.NSCoder, Metal.IMTLDevice)")
return true;
break;
case "MFMailComposeViewController": // You are meant to use the system provided one
@@ -472,28 +435,28 @@ namespace Introspection {
case "UIImagePickerController": // You are meant to use the system provided one
case "UIVideoEditorController": // You are meant to use the system provided one
case "VNDocumentCameraViewController": // Explicitly disabled on the headers
- if (ctor.ToString () == $"Void .ctor(System.String, {foundation_namespace}.NSBundle)")
+ if (cstr == $"Void .ctor(System.String, Foundation.NSBundle)")
return true;
- if (ctor.ToString () == $"Void .ctor(UIKit.UIViewController)")
+ if (cstr == $"Void .ctor(UIKit.UIViewController)")
return true;
break;
case "UICollectionViewCompositionalLayout":
// Explicitly disabled ctors - (instancetype)init NS_UNAVAILABLE;
return true;
case "NSPickerTouchBarItem": // You are meant to use the static factory methods
- if (ctor.ToString () == $"Void .ctor(System.String)")
+ if (cstr == $"Void .ctor(System.String)")
return true;
break;
case "NSMenuToolbarItem": // No ctor specified
- if (ctor.ToString () == $"Void .ctor(System.String)")
+ if (cstr == $"Void .ctor(System.String)")
return true;
break;
case "NSStepperTouchBarItem": // You are meant to use the static factory methods
- if (ctor.ToString () == $"Void .ctor(System.String)")
+ if (cstr == $"Void .ctor(System.String)")
return true;
break;
case "NSSharingServicePickerToolbarItem": // This type doesn't have .ctors
- if (ctor.ToString () == $"Void .ctor(System.String)")
+ if (cstr == $"Void .ctor(System.String)")
return true;
break;
}
diff --git a/tests/introspection/ApiFieldTest.cs b/tests/introspection/ApiFieldTest.cs
index acf100a8c4..1f194535b2 100644
--- a/tests/introspection/ApiFieldTest.cs
+++ b/tests/introspection/ApiFieldTest.cs
@@ -26,28 +26,14 @@ using System.Reflection;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
[Preserve (AllMembers = true)]
public abstract class ApiFieldTest : ApiBaseTest {
-#if XAMCORE_2_0
const string NSStringType = "Foundation.NSString";
-#elif MONOMAC
- const string NSStringType = "MonoMac.Foundation.NSString";
-#else
- const string NSStringType = "MonoTouch.Foundation.NSString";
-#endif
///
/// Override if you want to skip testing the specified type.
diff --git a/tests/introspection/ApiFrameworkTest.cs b/tests/introspection/ApiFrameworkTest.cs
index 5d05f6b553..919fff6844 100644
--- a/tests/introspection/ApiFrameworkTest.cs
+++ b/tests/introspection/ApiFrameworkTest.cs
@@ -1,4 +1,3 @@
-#if __UNIFIED__
using System;
using System.Collections.Generic;
using System.IO;
@@ -203,4 +202,3 @@ namespace Introspection {
#endif
}
}
-#endif
diff --git a/tests/introspection/ApiPInvokeTest.cs b/tests/introspection/ApiPInvokeTest.cs
index 8861d3b17c..f776379647 100644
--- a/tests/introspection/ApiPInvokeTest.cs
+++ b/tests/introspection/ApiPInvokeTest.cs
@@ -18,16 +18,8 @@ using Xamarin.Tests;
using NUnit.Framework;
-#if XAMCORE_2_0
using ObjCRuntime;
using Foundation;
-#elif MONOMAC
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-#endif
namespace Introspection
{
diff --git a/tests/introspection/ApiProtocolTest.cs b/tests/introspection/ApiProtocolTest.cs
index 7035f58879..1a8f2f51f2 100644
--- a/tests/introspection/ApiProtocolTest.cs
+++ b/tests/introspection/ApiProtocolTest.cs
@@ -12,16 +12,8 @@ using System.Reflection;
using System.Runtime.InteropServices;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
@@ -47,12 +39,6 @@ namespace Introspection {
case "JSExport":
return true;
default:
-#if !XAMCORE_2_0
- // in Classic our internal delegates _inherits_ the type with the [Protocol] attribute
- // in Unified our internal delegates _implements_ the interface that has the [Protocol] attribute
- if (type.GetCustomAttribute (true) != null)
- return true;
-#endif
return SkipDueToAttribute (type);
}
}
@@ -458,13 +444,6 @@ namespace Introspection {
// we have special test cases for them
continue;
default:
-#if !XAMCORE_2_0
- // in Classic our internal delegates _inherits_ the type with the [Protocol] attribute
- // in Unified our internal delegates _implements_ the interface that has the [Protocol] attribute
- var pt = Type.GetType (intf.Namespace + "." + protocolName + ", " + intf.Assembly.FullName);
- if (SkipDueToAttribute (pt))
- continue;
-#endif
if (Skip (t, protocolName))
continue;
break;
diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs
index 7a9bfd89fb..c840dca69b 100644
--- a/tests/introspection/ApiSelectorTest.cs
+++ b/tests/introspection/ApiSelectorTest.cs
@@ -23,16 +23,8 @@ using System;
using System.Reflection;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
@@ -57,11 +49,6 @@ namespace Introspection {
protected virtual bool Skip (Type type, string selectorName)
{
-#if !XAMCORE_2_0
- // old binding mistake
- if (selectorName == "subscribedCentrals")
- return true;
-#else
// The MapKit types/selectors are optional protocol members pulled in from MKAnnotation/MKOverlay.
// These concrete (wrapper) subclasses do not implement all of those optional members, but we
// still need to provide a binding for them, so that user subclasses can implement those members.
@@ -201,7 +188,6 @@ namespace Introspection {
break;
#endif
}
-#endif
// This ctors needs to be manually bound
switch (type.Name) {
case "AVCaptureVideoPreviewLayer":
diff --git a/tests/introspection/ApiSignatureTest.cs b/tests/introspection/ApiSignatureTest.cs
index dfb92a1539..66e97ff497 100644
--- a/tests/introspection/ApiSignatureTest.cs
+++ b/tests/introspection/ApiSignatureTest.cs
@@ -27,16 +27,8 @@ using System.Text;
using NUnit.Framework;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
@@ -409,21 +401,12 @@ namespace Introspection {
// NSValue 'static MonoTouch.Foundation.NSValue FromCMTime(CMTime)' selector: valueWithCMTime: == @32@0:4{?=qiIq}8
case "?":
return type.IsValueType; // || (type.FullName == "System.IntPtr");
-#if XAMCORE_2_0
case "CGRect":
return type.FullName == "CoreGraphics.CGRect";
case "CGSize":
return type.FullName == "CoreGraphics.CGSize";
case "CGPoint":
return type.FullName == "CoreGraphics.CGPoint";
-#else
- case "CGRect":
- return type.FullName == "System.Drawing.RectangleF";
- case "CGSize":
- return type.FullName == "System.Drawing.SizeF";
- case "CGPoint":
- return type.FullName == "System.Drawing.PointF";
-#endif
case "opaqueCMFormatDescription":
switch (type.Name) {
case "CMFormatDescription":
@@ -541,18 +524,8 @@ namespace Introspection {
case "AudioChannelLayout":
// this is actually an `nint` used as a pointer (to get a unique signature for the .ctor)
// there's custom code in src/AVFoundation/AVAudioChannelLayout.cs to deal with this
-#if XAMCORE_2_0
structName = "nint";
-#else
- structName = "Int32";
-#endif
break;
-#if !XAMCORE_2_0
- // in compat it's a class (instead of a struct) hence this hack
- case "AudioComponentDescription":
- structName = "AudioComponentDescriptionNative";
- break;
-#endif
}
return type.Name == structName;
}
@@ -807,9 +780,7 @@ namespace Introspection {
return false;
}
-#if XAMCORE_2_0
[Test]
-#endif
public void ManagedSignature ()
{
int n = 0;
diff --git a/tests/introspection/ApiStructTest.cs b/tests/introspection/ApiStructTest.cs
index 3e29fa4a8a..dff8e9809c 100644
--- a/tests/introspection/ApiStructTest.cs
+++ b/tests/introspection/ApiStructTest.cs
@@ -13,16 +13,8 @@ using System.Runtime.InteropServices;
using NUnit.Framework;
-#if XAMCORE_2_0
using ObjCRuntime;
using Foundation;
-#elif MONOMAC
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-#endif
namespace Introspection {
@@ -79,14 +71,12 @@ namespace Introspection {
protected virtual bool CheckField (Type type, FieldInfo fi)
{
-#if XAMCORE_2_0
if (fi.FieldType.IsEnum && fi.FieldType.GetCustomAttribute () != null) {
if (LogProgress)
Console.Error.WriteLine ("{0} has a [Native] enum field in its definition: {1} {2}",
type.FullName, fi.FieldType, fi.Name);
return false;
}
-#endif
return true;
}
}
diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs
index ec60fa3753..10511b41d3 100644
--- a/tests/introspection/ApiTypoTest.cs
+++ b/tests/introspection/ApiTypoTest.cs
@@ -27,7 +27,6 @@ using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using NUnit.Framework;
-#if XAMCORE_2_0
using ObjCRuntime;
#if MONOMAC
using AppKit;
@@ -35,17 +34,6 @@ using AppKit;
using UIKit;
#endif
using Foundation;
-#else
-#if MONOMAC
-using MonoMac;
-using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
-using MonoMac.Foundation;
-#else
-using MonoTouch.UIKit;
-#endif
-using MonoTouch.Foundation;
-#endif
namespace Introspection
{
@@ -607,37 +595,6 @@ namespace Introspection
"Zebibytes",
"Zettabits",
"Zlib",
-#if !XAMCORE_2_0
- // classic only mistakes - that should not change anymore
- "Timetime",
- "Rectfrom",
- "Distancefrom",
- "Calendarc",
- "Negotiat",
- "Trus",
- "Placemarks",
- "Chage",
- "Elipse",
- "intptr",
- "rbool",
- "rint",
- "rfloat",
- "rdouble",
- "rintptr",
- "cgsize",
- "cgpoint",
- "cgrect",
- "nsrange",
- "stret",
- "monotouch",
- "xamarin",
- "Dimiss",
- "Owneroptions",
- "Delegat",
- "Nibfor",
- "Delegatequeue",
- "Sispatch",
-#endif
#if MONOMAC
"Abbr",
"Accum",
@@ -731,138 +688,6 @@ namespace Introspection
"Wme",
"Writeln",
"Xattr",
-#if !XAMCORE_2_0
- // classic only mistakes - that should not change anymore
- "Oml",
- "Abgr",
- "Alc",
- "Alignmentrange",
- "Amd",
- "Argb",
- "Arrayrestricted",
- "Arrowhighlight",
- "Atc",
- "Atrrib",
- "Attribs",
- "Backgrounn",
- "Bgr",
- "Bgra",
- "Blittable",
- "Bptc",
- "Bufferi",
- "Ccw",
- "Chn",
- "Classand",
- "Clipmap",
- "Cnd",
- "Coeff",
- "Columnto",
- "Columnwith",
- "Completionfor",
- "Compressionfactor",
- "Coumn",
- "Decr",
- "Depthfunc",
- "Dfx",
- "Directionrange",
- "Dsize",
- "Dsdt",
- "Dst",
- "Dudv",
- "Edgeflag",
- "Efx",
- "Envmap",
- "Ffd",
- "Framebuffers",
- "Framezoom",
- "Frg",
- "Froom",
- "Funcs",
- "Gainsboro",
- "Gequal",
- "Gremedy",
- "Minmax",
- "Ibm",
- "ImgProgramBinary",
- "Incr",
- "Indexvalue",
- "Ingr",
- "Itemat",
- "Iui",
- "Latc",
- "Layeredge",
- "Lequal",
- "Listenerfv",
- "Lsb",
- "Markerto",
- "Meminfo",
- "Minmax",
- "monomac",
- "Mousein",
- "Multisampled",
- "Multitexture",
- "Mux",
- "Mvp",
- "Nand",
- "Nodechild",
- "Oes",
- "Opacityin",
- "Ortho",
- "Paletted",
- "Panelfor",
- "Pasteboardtype",
- "Pasteboardtypes",
- "Perfmon",
- "Pgi",
- "Phasein",
- "Preclip",
- "Pointerv",
- "Positionof",
- "Priorityfor",
- "Qcom",
- "Rangeaffinitystill",
- "Rangesaffinitystill",
- "Rangereplacement",
- "Rangesreplacement",
- "Recip",
- "Rectby",
- "Rectcolorturned",
- "Rectto",
- "Rectwith",
- "Rgtc",
- "Rowcolumn",
- "Rowin",
- "Scalebias",
- "Sgi",
- "Sgis",
- "Sgix",
- "SgixYcrcba",
- "Sgx",
- "Sluminance",
- "Sourceb",
- "Sourcef",
- "Staterange",
- "Stq",
- "Strq",
- "Subtexture",
- "Sunx",
- "Tesselation",
- "Texgen",
- "Tipfor",
- "Unmap",
- "Unqueue",
- "Unsignaled",
- "Vdpau",
- "Vec",
- "Vtc",
- "Writemask",
- "Writeonly",
- "Ycbaycr",
- "Ycbycr",
- "Ycrcb",
- "Ycbcr",
- "Ycrcba",
-#endif
#endif
#if !XAMCORE_4_0
"Actionfrom",
diff --git a/tests/introspection/ApiWeakPropertyTest.cs b/tests/introspection/ApiWeakPropertyTest.cs
index 78eb9cf637..48e88ac4a3 100644
--- a/tests/introspection/ApiWeakPropertyTest.cs
+++ b/tests/introspection/ApiWeakPropertyTest.cs
@@ -5,16 +5,8 @@ using System.Reflection;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
[Preserve (AllMembers = true)]
diff --git a/tests/introspection/CoreSelectorTest.cs b/tests/introspection/CoreSelectorTest.cs
index 4538a56b8a..eb7cdead02 100644
--- a/tests/introspection/CoreSelectorTest.cs
+++ b/tests/introspection/CoreSelectorTest.cs
@@ -11,16 +11,8 @@ using System;
using System.Reflection;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#elif MONOMAC
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace Introspection {
diff --git a/tests/introspection/Mac/MacApiCtorInitTest.cs b/tests/introspection/Mac/MacApiCtorInitTest.cs
index 55b781d633..eed8fa0ab4 100644
--- a/tests/introspection/Mac/MacApiCtorInitTest.cs
+++ b/tests/introspection/Mac/MacApiCtorInitTest.cs
@@ -11,11 +11,7 @@ using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoMac.Foundation;
-#endif
using NUnit.Framework;
using Xamarin.Tests;
@@ -98,12 +94,6 @@ namespace Introspection {
case "MonoMac.AppKit.NSWindow":
case "AppKit.NSWindow":
return true;
-#if !XAMCORE_2_0
- case "MonoMac.AppKit.NSToolbar": // mono[10518:626783] *** -[__NSDictionaryM removeObjectForKey:]: key cannot be nil
- case "MonoMac.SceneKit.SCNRenderer": // -[SCNRenderer init]: unrecognized selector sent to instance 0x7c6446c0
- case "MonoMac.SceneKit.SCNLookAtConstraint":
- return true;
-#endif
case "MonoMac.Foundation.NSUrlSession":
case "Foundation.NSUrlSession":
case "MonoMac.Foundation.NSUrlSessionTask":
diff --git a/tests/introspection/Mac/MacApiFieldTest.cs b/tests/introspection/Mac/MacApiFieldTest.cs
index d73c514f45..0fdd230345 100644
--- a/tests/introspection/Mac/MacApiFieldTest.cs
+++ b/tests/introspection/Mac/MacApiFieldTest.cs
@@ -24,12 +24,6 @@ namespace Introspection {
ContinueOnFailure = true;
}
- static bool IsUnified {
- get {
- return AppDomain.CurrentDomain.GetAssemblies ().Any (x => x.FullName.Contains ("Xamarin.Mac"));
- }
- }
-
protected override bool Skip (Type type)
{
switch (type.FullName) {
@@ -159,14 +153,6 @@ namespace Introspection {
if (Mac.CheckSystemVersion (10, 13)) // radar 32858911
return true;
goto default;
-#if !__UNIFIED__
- case "InputRSSArticleDurationKey":
- case "InputRSSFeedURLKey":
- case "ProtocolRSSVisualizer":
- if (Mac.CheckSystemVersion (10, 14))
- return true;
- goto default;
-#endif
default:
return base.Skip (p);
}
@@ -182,7 +168,7 @@ namespace Introspection {
// Only there for API compat
case "kSecUseNoAuthenticationUI":
case "kSecUseOperationPrompt":
- return !IsUnified;
+ return false;
// MonoMac.CoreServices.CFHTTPMessage - document in 10.9 but returns null
case "kCFHTTPAuthenticationSchemeOAuth1":
return true;
@@ -194,14 +180,12 @@ namespace Introspection {
if (Mac.Is32BitMavericks)
return true;
goto default;
-#if !UNIFIED
case "QCCompositionInputRSSArticleDurationKey":
case "QCCompositionInputRSSFeedURLKey":
case "QCCompositionProtocolRSSVisualizer":
if (Mac.CheckSystemVersion (10, 14))
return true;
goto default;
-#endif
default:
return base.Skip (constantName, libraryName);
}
diff --git a/tests/introspection/Mac/MacApiProtocolTest.cs b/tests/introspection/Mac/MacApiProtocolTest.cs
index 9ec7d6b96e..da5063ccf2 100644
--- a/tests/introspection/Mac/MacApiProtocolTest.cs
+++ b/tests/introspection/Mac/MacApiProtocolTest.cs
@@ -9,14 +9,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using AppKit;
using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.CoreImage;
-#endif
using NUnit.Framework;
using Xamarin.Tests;
@@ -90,16 +85,6 @@ namespace Introspection {
case "NSPrintInfo": // Conformance not in headers
case "NSPrinter": // Conformance not in headers
return true;
-#if !__UNIFIED__
- // existing classic/old binary is not updated
- case "NSAppearance":
- case "NSBezierPath":
- case "NSFileWrapper":
- case "NSGradient":
- case "NSSound":
- case "NSShadow":
- return true;
-#endif
default:
// CIFilter started implementing NSSecureCoding in 10.11
if (!Mac.CheckSystemVersion (10, 11) && (type == typeof(CIFilter) || type.IsSubclassOf (typeof(CIFilter))))
diff --git a/tests/introspection/Mac/MacApiSelectorTest.cs b/tests/introspection/Mac/MacApiSelectorTest.cs
index 76601a62f3..fe8765558e 100644
--- a/tests/introspection/Mac/MacApiSelectorTest.cs
+++ b/tests/introspection/Mac/MacApiSelectorTest.cs
@@ -11,13 +11,8 @@ using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
using NUnit.Framework;
using Xamarin.Tests;
diff --git a/tests/introspection/Mac/MacApiSignatureTest.cs b/tests/introspection/Mac/MacApiSignatureTest.cs
index 9ba5f6d77d..17c1074b6c 100644
--- a/tests/introspection/Mac/MacApiSignatureTest.cs
+++ b/tests/introspection/Mac/MacApiSignatureTest.cs
@@ -13,13 +13,8 @@ using System.Reflection;
using NUnit.Framework;
using Xamarin.Tests;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-#endif
namespace Introspection {
@@ -159,23 +154,11 @@ namespace Introspection {
{
switch (structName) {
case "_NSPoint":
-#if XAMCORE_2_0
return type.FullName == "CoreGraphics.CGPoint";
-#else
- return type.FullName == "System.Drawing.PointF";
-#endif
case "_NSRect":
-#if XAMCORE_2_0
return type.FullName == "CoreGraphics.CGRect";
-#else
- return type.FullName == "System.Drawing.RectangleF";
-#endif
case "_NSSize":
-#if XAMCORE_2_0
return type.FullName == "CoreGraphics.CGSize";
-#else
- return type.FullName == "System.Drawing.SizeF";
-#endif
case "_SCNVector3":
return type.Name == "SCNVector3";
case "_SCNVector4":
diff --git a/tests/introspection/Mac/MacApiTypoTest.cs b/tests/introspection/Mac/MacApiTypoTest.cs
index e8531ab404..f309e77635 100644
--- a/tests/introspection/Mac/MacApiTypoTest.cs
+++ b/tests/introspection/Mac/MacApiTypoTest.cs
@@ -1,4 +1,3 @@
-#if XAMCORE_2_0
using System;
using NUnit.Framework;
@@ -42,4 +41,3 @@ namespace Introspection
}
}
}
-#endif
diff --git a/tests/introspection/Mac/MacApiWeakPropertyTest.cs b/tests/introspection/Mac/MacApiWeakPropertyTest.cs
index 0938c8d759..cacd3b5b09 100644
--- a/tests/introspection/Mac/MacApiWeakPropertyTest.cs
+++ b/tests/introspection/Mac/MacApiWeakPropertyTest.cs
@@ -1,10 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoMac.Foundation;
-#endif
using NUnit.Framework;
using Xamarin.Tests;
diff --git a/tests/introspection/Mac/MacCoreImageFiltersTest.cs b/tests/introspection/Mac/MacCoreImageFiltersTest.cs
index 8df1cc42c3..203115f796 100644
--- a/tests/introspection/Mac/MacCoreImageFiltersTest.cs
+++ b/tests/introspection/Mac/MacCoreImageFiltersTest.cs
@@ -40,26 +40,6 @@ namespace Introspection {
break;
case "CICMYKHalftone": // Renamed as CICmykHalftone
return true;
-#if !__UNIFIED__
- case "CIAreaMinMaxRed":
- case "CIAttributedTextImageGenerator":
- case "CIBarcodeGenerator":
- case "CIBicubicScaleTransform":
- case "CIBlendWithBlueMask":
- case "CIBlendWithRedMask":
- case "CIBokehBlur":
- case "CIColorCubesMixedWithMask":
- case "CIColorCurves":
- case "CIDepthBlurEffect":
- case "CIDepthToDisparity":
- case "CIDisparityToDepth":
- case "CILabDeltaE":
- case "CIMorphologyGradient":
- case "CIMorphologyMaximum":
- case "CIMorphologyMinimum":
- case "CITextImageGenerator":
- return true;
-#endif
case "CIAreaMinMax":
case "CICameraCalibrationLensCorrection":
case "CIDither":
diff --git a/tests/introspection/Mac/introspection-mac.csproj b/tests/introspection/Mac/introspection-mac.csproj
index 78a1165f24..e770690103 100644
--- a/tests/introspection/Mac/introspection-mac.csproj
+++ b/tests/introspection/Mac/introspection-mac.csproj
@@ -13,7 +13,7 @@
obj\$(Platform)\$(Configuration)
Xamarin.Mac
x86_64
- XAMCORE_2_0
+
true
diff --git a/tests/introspection/iOS/AppDelegate.cs b/tests/introspection/iOS/AppDelegate.cs
index b2067a32ef..e966160943 100644
--- a/tests/introspection/iOS/AppDelegate.cs
+++ b/tests/introspection/iOS/AppDelegate.cs
@@ -1,13 +1,8 @@
#if !__WATCHOS__
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
namespace Introspection {
diff --git a/tests/introspection/iOS/Main.cs b/tests/introspection/iOS/Main.cs
index 12c5bdd9b3..5a1733d3d3 100644
--- a/tests/introspection/iOS/Main.cs
+++ b/tests/introspection/iOS/Main.cs
@@ -1,12 +1,7 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace dontlink
{
diff --git a/tests/introspection/iOS/iOSApiClassPtrTest.cs b/tests/introspection/iOS/iOSApiClassPtrTest.cs
index 09f31fafc1..514b26a526 100644
--- a/tests/introspection/iOS/iOSApiClassPtrTest.cs
+++ b/tests/introspection/iOS/iOSApiClassPtrTest.cs
@@ -8,13 +8,8 @@
//
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace Introspection {
diff --git a/tests/introspection/iOS/iOSApiCtorInitTest.cs b/tests/introspection/iOS/iOSApiCtorInitTest.cs
index d218ae4243..617ac09c67 100644
--- a/tests/introspection/iOS/iOSApiCtorInitTest.cs
+++ b/tests/introspection/iOS/iOSApiCtorInitTest.cs
@@ -10,7 +10,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
#if !__TVOS__
using PassKit;
#endif
@@ -20,13 +19,6 @@ using Metal;
#endif
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.PassKit;
-using MonoTouch.Foundation;
-using MonoTouch.Metal;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
@@ -159,17 +151,6 @@ namespace Introspection {
case "CAMetalLayer":
return (Runtime.Arch == Arch.SIMULATOR) && !TestRuntime.CheckXcodeVersion (11, 0);
-#if !XAMCORE_2_0
- // from iOS8 (beta4) they do not return a valid handle
- case "AVAssetResourceLoader":
- case "AVAssetResourceLoadingRequest":
- case "AVAssetResourceLoadingContentInformationRequest":
- return true;
- // Started with iOS8 on simulator (always) but it looks like it can happen on devices too
- // NSInvalidArgumentException Use initWithAccessibilityContainer:
- case "UIAccessibilityElement":
- return TestRuntime.CheckXcodeVersion (6, 0);
-#endif
// in 8.2 beta 1 this crash the app (simulator) without giving any details in the logs
case "WKUserNotificationInterfaceController":
return true;
diff --git a/tests/introspection/iOS/iOSApiFieldTest.cs b/tests/introspection/iOS/iOSApiFieldTest.cs
index cb2999699b..aa68f7eaf9 100644
--- a/tests/introspection/iOS/iOSApiFieldTest.cs
+++ b/tests/introspection/iOS/iOSApiFieldTest.cs
@@ -9,15 +9,9 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace Introspection {
diff --git a/tests/introspection/iOS/iOSApiPInvokeTest.cs b/tests/introspection/iOS/iOSApiPInvokeTest.cs
index 82fd9d2e9d..95844a7cf7 100644
--- a/tests/introspection/iOS/iOSApiPInvokeTest.cs
+++ b/tests/introspection/iOS/iOSApiPInvokeTest.cs
@@ -11,16 +11,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace Introspection {
diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs
index 628be41459..91b8e29aa1 100644
--- a/tests/introspection/iOS/iOSApiProtocolTest.cs
+++ b/tests/introspection/iOS/iOSApiProtocolTest.cs
@@ -8,19 +8,12 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
#if !__TVOS__
using WatchConnectivity;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouch.WatchConnectivity;
-#endif
using NUnit.Framework;
namespace Introspection {
diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs
index 217965fd09..3c88dce2e1 100644
--- a/tests/introspection/iOS/iOSApiSelectorTest.cs
+++ b/tests/introspection/iOS/iOSApiSelectorTest.cs
@@ -10,19 +10,12 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
#if !__TVOS__
using WatchConnectivity;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouch.WatchConnectivity;
-#endif
using NUnit.Framework;
namespace Introspection {
@@ -375,29 +368,6 @@ namespace Introspection {
if (declaredType.Name == "UIResponder")
return true;
break;
-#if !XAMCORE_2_0
- case "enableInputClicksWhenVisible":
- // defined in UIInputViewAudioFeedback protocol
- // meant to be added (not part of iOS) in custom UIView and defined (by default) by MonoTouch
- if (declaredType.Name == "UIView")
- return true;
- break;
- case "subtitle":
- // exists because of MKAnnotation protocol
- if (declaredType.Name == "MKPlacemark")
- return true;
- break;
- case "setCoordinate:":
- // exists because of MKAnnotation protocol
- if (declaredType.Name == "MKShape" || declaredType.Name == "MKPlacemark")
- return true;
- break;
- case "intersectsMapRect:":
- // optional method of a protocol MKTileOverlay implements.
- if (declaredType.Name == "MKTileOverlay")
- return true;
- break;
-#endif
case "autocapitalizationType":
case "setAutocapitalizationType:":
case "autocorrectionType":
@@ -750,7 +720,6 @@ namespace Introspection {
}
break;
-#if XAMCORE_2_0
// some types adopted NS[Secure]Coding after the type was added
// and for unified that's something we generate automatically (so we can't put [iOS] on them)
case "encodeWithCoder:":
@@ -777,15 +746,6 @@ namespace Introspection {
#endif
}
break;
-#else
- // that was a binding mistake - the API should not have been exposed (not in the header file)
- // we'll ignore them for compat - but won't provide them in the new assemblies
- case "backgroundImageForBarMetrics:":
- case "setBackgroundImage:forBarMetrics:":
- if (declaredType.Name == "UISearchBar" && TestRuntime.CheckXcodeVersion (6, 0))
- return true;
- break;
-#endif
case "mutableCopyWithZone:":
switch (declaredType.Name) {
case "HMLocationEvent":
diff --git a/tests/introspection/iOS/iOSApiSignatureTest.cs b/tests/introspection/iOS/iOSApiSignatureTest.cs
index b41038d830..bc7afb657d 100644
--- a/tests/introspection/iOS/iOSApiSignatureTest.cs
+++ b/tests/introspection/iOS/iOSApiSignatureTest.cs
@@ -12,15 +12,9 @@ using System.Reflection;
using NUnit.Framework;
-#if XAMCORE_2_0
using ObjCRuntime;
using Foundation;
using UIKit;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace Introspection {
@@ -115,15 +109,6 @@ namespace Introspection {
switch (encodedType) {
case 'c': // char, used for C# bool
-#if !XAMCORE_2_0
- switch (type.FullName) {
- // looks like it returns a bool even if documented as a void
- // UIPrintInteractionController 'instance Void Present(Boolean, MonoTouch.UIKit.UIPrintInteractionCompletionHandler)' selector: presentAnimated:completionHandler:
- // update: documentation (and header) mistake that Apple corrected (IIRC I filled that issue)
- case "System.Void":
- return CurrentType.Name == "UIPrintInteractionController";
- }
-#endif
break;
// float (32 bits)
case 'f':
diff --git a/tests/introspection/iOS/iOSApiTypoTest.cs b/tests/introspection/iOS/iOSApiTypoTest.cs
index b9dcc13d31..aa098dab30 100644
--- a/tests/introspection/iOS/iOSApiTypoTest.cs
+++ b/tests/introspection/iOS/iOSApiTypoTest.cs
@@ -1,16 +1,9 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
namespace Introspection {
diff --git a/tests/introspection/iOS/iOSApiWeakPropertyTest.cs b/tests/introspection/iOS/iOSApiWeakPropertyTest.cs
index b848b3359e..82a4d83ca9 100644
--- a/tests/introspection/iOS/iOSApiWeakPropertyTest.cs
+++ b/tests/introspection/iOS/iOSApiWeakPropertyTest.cs
@@ -1,11 +1,7 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/introspection/iOS/iOSCoreImageFiltersTest.cs b/tests/introspection/iOS/iOSCoreImageFiltersTest.cs
index feadfad248..bdb6e9c09e 100644
--- a/tests/introspection/iOS/iOSCoreImageFiltersTest.cs
+++ b/tests/introspection/iOS/iOSCoreImageFiltersTest.cs
@@ -12,15 +12,9 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using CoreImage;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace Introspection {
diff --git a/tests/introspection/iOS/introspection-ios.csproj b/tests/introspection/iOS/introspection-ios.csproj
index 6ddded802d..76e17ba98c 100644
--- a/tests/introspection/iOS/introspection-ios.csproj
+++ b/tests/introspection/iOS/introspection-ios.csproj
@@ -12,7 +12,7 @@
introspection
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/linker/CommonDontLinkTest.cs b/tests/linker/CommonDontLinkTest.cs
index 1fa9f2dc31..5f70d5d744 100644
--- a/tests/linker/CommonDontLinkTest.cs
+++ b/tests/linker/CommonDontLinkTest.cs
@@ -4,11 +4,7 @@ using System.Reflection;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
-#elif MONOMAC
-using MonoMac.Foundation;
-#endif
namespace DontLink {
diff --git a/tests/linker/ios/dont link/AppDelegate.cs b/tests/linker/ios/dont link/AppDelegate.cs
index 87c5c2f3b3..372f03d60b 100644
--- a/tests/linker/ios/dont link/AppDelegate.cs
+++ b/tests/linker/ios/dont link/AppDelegate.cs
@@ -1,13 +1,8 @@
#if !__WATCHOS__
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
namespace DontLink
diff --git a/tests/linker/ios/dont link/CalendarTest.cs b/tests/linker/ios/dont link/CalendarTest.cs
index 953645619b..8afab9aa9c 100644
--- a/tests/linker/ios/dont link/CalendarTest.cs
+++ b/tests/linker/ios/dont link/CalendarTest.cs
@@ -2,11 +2,7 @@
using System;
using System.Globalization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace DontLink.Calendars {
diff --git a/tests/linker/ios/dont link/DontLinkRegressionTests.cs b/tests/linker/ios/dont link/DontLinkRegressionTests.cs
index 0370dc423e..afba36556e 100644
--- a/tests/linker/ios/dont link/DontLinkRegressionTests.cs
+++ b/tests/linker/ios/dont link/DontLinkRegressionTests.cs
@@ -17,13 +17,9 @@ using System.Runtime.InteropServices;
using System.Security.Permissions;
using MonoTouch;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace DontLink {
@@ -57,13 +53,8 @@ namespace DontLink {
public void RemovedAttributes ()
{
// since we do not link the attributes will be available - used or not by the application
-#if XAMCORE_2_0
var fullname = typeof (NSObject).Assembly.FullName;
Assert.NotNull (Type.GetType ("ObjCRuntime.ThreadSafeAttribute, " + fullname), "ThreadSafeAttribute");
-#else
- Assert.NotNull (Type.GetType ("MonoTouch.ObjCRuntime.SinceAttribute, monotouch"), "SinceAttribute");
- Assert.NotNull (Type.GetType ("MonoTouch.ObjCRuntime.ThreadSafeAttribute, monotouch"), "ThreadSafeAttribute");
-#endif
}
[Test]
diff --git a/tests/linker/ios/dont link/Main.cs b/tests/linker/ios/dont link/Main.cs
index 12c5bdd9b3..5a1733d3d3 100644
--- a/tests/linker/ios/dont link/Main.cs
+++ b/tests/linker/ios/dont link/Main.cs
@@ -1,12 +1,7 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace dontlink
{
diff --git a/tests/linker/ios/dont link/TableViewSourceTest.cs b/tests/linker/ios/dont link/TableViewSourceTest.cs
index 53803b494c..327cc91f67 100644
--- a/tests/linker/ios/dont link/TableViewSourceTest.cs
+++ b/tests/linker/ios/dont link/TableViewSourceTest.cs
@@ -13,13 +13,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace DontLink.UIKit {
diff --git a/tests/linker/ios/dont link/dont link.csproj b/tests/linker/ios/dont link/dont link.csproj
index 0542807a25..826c763f2e 100644
--- a/tests/linker/ios/dont link/dont link.csproj
+++ b/tests/linker/ios/dont link/dont link.csproj
@@ -12,7 +12,7 @@
dont link
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
True
diff --git a/tests/linker/ios/link all/AppDelegate.cs b/tests/linker/ios/link all/AppDelegate.cs
index 06a94bca48..48d34956be 100644
--- a/tests/linker/ios/link all/AppDelegate.cs
+++ b/tests/linker/ios/link all/AppDelegate.cs
@@ -3,13 +3,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
namespace LinkAll
diff --git a/tests/linker/ios/link all/AttributeTest.cs b/tests/linker/ios/link all/AttributeTest.cs
index 8cfcc83949..dd5d7535c4 100644
--- a/tests/linker/ios/link all/AttributeTest.cs
+++ b/tests/linker/ios/link all/AttributeTest.cs
@@ -15,11 +15,7 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Permissions;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/linker/ios/link all/CalendarTest.cs b/tests/linker/ios/link all/CalendarTest.cs
index e0621e8fa2..fd223f2fca 100644
--- a/tests/linker/ios/link all/CalendarTest.cs
+++ b/tests/linker/ios/link all/CalendarTest.cs
@@ -2,11 +2,7 @@
using System;
using System.Globalization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll.Calendars {
diff --git a/tests/linker/ios/link all/ClassLayoutTest.cs b/tests/linker/ios/link all/ClassLayoutTest.cs
index 61f60900c0..5a8d7854dd 100644
--- a/tests/linker/ios/link all/ClassLayoutTest.cs
+++ b/tests/linker/ios/link all/ClassLayoutTest.cs
@@ -9,11 +9,7 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll.Layout {
diff --git a/tests/linker/ios/link all/InterfacesTest.cs b/tests/linker/ios/link all/InterfacesTest.cs
index 22514c8692..2720c23dd8 100644
--- a/tests/linker/ios/link all/InterfacesTest.cs
+++ b/tests/linker/ios/link all/InterfacesTest.cs
@@ -10,11 +10,7 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll.Interfaces {
diff --git a/tests/linker/ios/link all/InternalsTest.cs b/tests/linker/ios/link all/InternalsTest.cs
index 719c938d01..f6731f2055 100644
--- a/tests/linker/ios/link all/InternalsTest.cs
+++ b/tests/linker/ios/link all/InternalsTest.cs
@@ -11,13 +11,8 @@ using System;
using System.Runtime.InteropServices;
using MonoTouch;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace LinkAll.InernalCalls {
@@ -46,14 +41,6 @@ namespace LinkAll.InernalCalls {
xamarin_log ("ЉЩщӃ");
}
-#if !XAMCORE_2_0
- [Test]
- public void MessagingApi ()
- {
- Messaging.monotouch_IntPtr_objc_msgSend_IntPtr (IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
- }
-#endif
-
[DllImport ("__Internal")]
extern static IntPtr xamarin_timezone_get_names (ref int count);
diff --git a/tests/linker/ios/link all/LinkAllTest.cs b/tests/linker/ios/link all/LinkAllTest.cs
index 443bcd8cac..e6353492cc 100644
--- a/tests/linker/ios/link all/LinkAllTest.cs
+++ b/tests/linker/ios/link all/LinkAllTest.cs
@@ -20,7 +20,6 @@ using System.Threading.Tasks;
using System.Security.Cryptography.X509Certificates;
using MonoTouch;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ObjCRuntime;
@@ -28,13 +27,6 @@ using ObjCRuntime;
using StoreKit;
#endif
using UIKit;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.StoreKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
@@ -528,23 +520,11 @@ namespace LinkAll {
var value = fi.GetValue (pr.WeakDelegate);
Assert.NotNull (value, "value");
-#if XAMCORE_2_0
// and on the SKRequest defined one
pr.RequestFailed += (object sender, SKRequestErrorEventArgs e) => {};
// and the existing (initial field) is still set
fi = t.GetField ("receivedResponse", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull (fi, "receivedResponse/SKRequest");
-#else
- // In Classic SKRequest also defines a RequestFailed event, so make sure we get the SKRequest one
- // that's because event are re-defined (new) in classic
- ((SKRequest) pr).RequestFailed += (object sender, SKRequestErrorEventArgs e) => {};
-
- t = pr.WeakDelegate.GetType ();
- Assert.That (t.Name, Is.EqualTo ("_SKRequestDelegate"), "delegate-2");
-
- fi = t.GetField ("receivedResponse", BindingFlags.NonPublic | BindingFlags.Instance);
- Assert.Null (fi, "receivedResponse/SKRequest");
-#endif
}
}
#endif // !__WATCHOS__
diff --git a/tests/linker/ios/link all/LinqExpressionTest.cs b/tests/linker/ios/link all/LinqExpressionTest.cs
index f086260199..2c8f96de0c 100644
--- a/tests/linker/ios/link all/LinqExpressionTest.cs
+++ b/tests/linker/ios/link all/LinqExpressionTest.cs
@@ -1,10 +1,6 @@
using System;
using System.Linq.Expressions;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll.Linq {
diff --git a/tests/linker/ios/link all/MEFTests.cs b/tests/linker/ios/link all/MEFTests.cs
index 190b093eac..f210e800aa 100644
--- a/tests/linker/ios/link all/MEFTests.cs
+++ b/tests/linker/ios/link all/MEFTests.cs
@@ -4,11 +4,7 @@ using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.Linq;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll.Mef {
diff --git a/tests/linker/ios/link all/Main.cs b/tests/linker/ios/link all/Main.cs
index c9b0815dd9..378d25b29f 100644
--- a/tests/linker/ios/link all/Main.cs
+++ b/tests/linker/ios/link all/Main.cs
@@ -1,10 +1,6 @@
using System;
-#if XAMCORE_2_0
using UIKit;
-#else
-using MonoTouch.UIKit;
-#endif
namespace LinkAll
{
diff --git a/tests/linker/ios/link all/PreserveTest.cs b/tests/linker/ios/link all/PreserveTest.cs
index 69745f6fad..eb08343874 100644
--- a/tests/linker/ios/link all/PreserveTest.cs
+++ b/tests/linker/ios/link all/PreserveTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
// this will preserve the specified type (only)
diff --git a/tests/linker/ios/link all/SealerTest.cs b/tests/linker/ios/link all/SealerTest.cs
index 49628fc261..297600627b 100644
--- a/tests/linker/ios/link all/SealerTest.cs
+++ b/tests/linker/ios/link all/SealerTest.cs
@@ -1,11 +1,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace Linker.Sealer {
diff --git a/tests/linker/ios/link all/SerializationTest.cs b/tests/linker/ios/link all/SerializationTest.cs
index ecfcc4a368..7a7edaa501 100644
--- a/tests/linker/ios/link all/SerializationTest.cs
+++ b/tests/linker/ios/link all/SerializationTest.cs
@@ -9,11 +9,7 @@
using System;
using System.Runtime.Serialization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll
diff --git a/tests/linker/ios/link all/StructLayoutTest.cs b/tests/linker/ios/link all/StructLayoutTest.cs
index 2ef9634b71..aa32a655ac 100644
--- a/tests/linker/ios/link all/StructLayoutTest.cs
+++ b/tests/linker/ios/link all/StructLayoutTest.cs
@@ -9,11 +9,7 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkAll.Layout {
diff --git a/tests/linker/ios/link all/XmlSerializationTest.cs b/tests/linker/ios/link all/XmlSerializationTest.cs
index 34da3861a1..cc8dfdb572 100644
--- a/tests/linker/ios/link all/XmlSerializationTest.cs
+++ b/tests/linker/ios/link all/XmlSerializationTest.cs
@@ -12,11 +12,7 @@ using System.IO;
using System.Xml;
using System.Xml.Serialization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/linker/ios/link all/link all.csproj b/tests/linker/ios/link all/link all.csproj
index 4839600cd1..c4ea1b5d11 100644
--- a/tests/linker/ios/link all/link all.csproj
+++ b/tests/linker/ios/link all/link all.csproj
@@ -12,7 +12,7 @@
link all
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/linker/ios/link sdk/AotBugs.cs b/tests/linker/ios/link sdk/AotBugs.cs
index f4f6ce17e3..d66d65b052 100644
--- a/tests/linker/ios/link sdk/AotBugs.cs
+++ b/tests/linker/ios/link sdk/AotBugs.cs
@@ -8,25 +8,9 @@ using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
-
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using NUnit.Framework;
@@ -600,8 +584,8 @@ namespace LinkSdk.Aot {
[Test]
public void Bug26245 ()
{
- var c = new Collection ();
- c.Add (new PointF (50, 50)); // crashed under ARM64
+ var c = new Collection ();
+ c.Add (new CGPoint (50, 50)); // crashed under ARM64
Assert.That (c.Count, Is.EqualTo (1));
}
diff --git a/tests/linker/ios/link sdk/AppDelegate.cs b/tests/linker/ios/link sdk/AppDelegate.cs
index 6b6315b6c4..fb05c51c3e 100644
--- a/tests/linker/ios/link sdk/AppDelegate.cs
+++ b/tests/linker/ios/link sdk/AppDelegate.cs
@@ -4,13 +4,8 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
namespace LinkSdk
diff --git a/tests/linker/ios/link sdk/AsyncTest.cs b/tests/linker/ios/link sdk/AsyncTest.cs
index 1e0192181e..d861a2f7bf 100644
--- a/tests/linker/ios/link sdk/AsyncTest.cs
+++ b/tests/linker/ios/link sdk/AsyncTest.cs
@@ -1,11 +1,7 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/linker/ios/link sdk/Bug1820Test.cs b/tests/linker/ios/link sdk/Bug1820Test.cs
index 64062f527e..e9708d0f07 100644
--- a/tests/linker/ios/link sdk/Bug1820Test.cs
+++ b/tests/linker/ios/link sdk/Bug1820Test.cs
@@ -4,11 +4,7 @@ using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk.Serialization {
diff --git a/tests/linker/ios/link sdk/Bug2096Test.cs b/tests/linker/ios/link sdk/Bug2096Test.cs
index eecd05b483..764374ba5d 100644
--- a/tests/linker/ios/link sdk/Bug2096Test.cs
+++ b/tests/linker/ios/link sdk/Bug2096Test.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace LinkSdk.Aot {
diff --git a/tests/linker/ios/link sdk/CalendarTest.cs b/tests/linker/ios/link sdk/CalendarTest.cs
index 004bedc386..f5e1504ef3 100644
--- a/tests/linker/ios/link sdk/CalendarTest.cs
+++ b/tests/linker/ios/link sdk/CalendarTest.cs
@@ -2,11 +2,7 @@
using System;
using System.Globalization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk.Calendars {
diff --git a/tests/linker/ios/link sdk/CryptoTest.cs b/tests/linker/ios/link sdk/CryptoTest.cs
index 8a09c7f505..0245e30796 100644
--- a/tests/linker/ios/link sdk/CryptoTest.cs
+++ b/tests/linker/ios/link sdk/CryptoTest.cs
@@ -12,11 +12,7 @@ using System.Net;
using System.Net.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/linker/ios/link sdk/DataContractTest.cs b/tests/linker/ios/link sdk/DataContractTest.cs
index e76945d78f..02e7f7d6be 100644
--- a/tests/linker/ios/link sdk/DataContractTest.cs
+++ b/tests/linker/ios/link sdk/DataContractTest.cs
@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk {
diff --git a/tests/linker/ios/link sdk/DllImportTest.cs b/tests/linker/ios/link sdk/DllImportTest.cs
index cdc6a99053..0651452236 100644
--- a/tests/linker/ios/link sdk/DllImportTest.cs
+++ b/tests/linker/ios/link sdk/DllImportTest.cs
@@ -10,16 +10,9 @@
using System;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace LinkSdk {
diff --git a/tests/linker/ios/link sdk/HttpClientHandlerTest.cs b/tests/linker/ios/link sdk/HttpClientHandlerTest.cs
index 6a347f65ed..aa88817389 100644
--- a/tests/linker/ios/link sdk/HttpClientHandlerTest.cs
+++ b/tests/linker/ios/link sdk/HttpClientHandlerTest.cs
@@ -5,11 +5,7 @@
using System;
using System.Net;
using System.Net.Http;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk.Net.Http {
diff --git a/tests/linker/ios/link sdk/HttpClientTest.cs b/tests/linker/ios/link sdk/HttpClientTest.cs
index 4c7b0d05f3..afc603af19 100644
--- a/tests/linker/ios/link sdk/HttpClientTest.cs
+++ b/tests/linker/ios/link sdk/HttpClientTest.cs
@@ -1,11 +1,7 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/linker/ios/link sdk/LinkExtraDefsTest.cs b/tests/linker/ios/link sdk/LinkExtraDefsTest.cs
index c980ca63bd..434ba5015e 100644
--- a/tests/linker/ios/link sdk/LinkExtraDefsTest.cs
+++ b/tests/linker/ios/link sdk/LinkExtraDefsTest.cs
@@ -9,11 +9,7 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk {
@@ -50,11 +46,7 @@ namespace LinkSdk {
[Test]
public void MonoTouch ()
{
-#if XAMCORE_2_0
Type t = Type.GetType ("CoreBluetooth.CBUUID, " + typeof(NSObject).Assembly.ToString ());
-#else
- Type t = Type.GetType ("MonoTouch.CoreBluetooth.CBUUID, monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
-#endif
Assert.NotNull (t, "[MonoTouch.]CoreBluetooth.CBUUID");
// check (generated) fields since we instructed the linker to keep them
var f = t.GetFields (BindingFlags.NonPublic | BindingFlags.Static);
diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs
index 4f63bf08fb..8d63886755 100644
--- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs
+++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs
@@ -20,7 +20,6 @@ using System.Threading;
using System.Xml;
using Mono.Data.Sqlite;
using MonoTouch;
-#if XAMCORE_2_0
#if !__TVOS__ && !__WATCHOS__
using AddressBook;
using AddressBookUI;
@@ -40,20 +39,6 @@ using UIKit;
using OpenGLES;
#endif
using WebKit;
-#else
-using MonoTouch;
-using MonoTouch.AddressBook;
-using MonoTouch.AddressBookUI;
-using MonoTouch.CoreAnimation;
-using MonoTouch.CoreData;
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-using MonoTouch.OpenGLES;
-using MonoTouch.WebKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
@@ -434,11 +419,7 @@ namespace LinkSdk {
[Test]
public void OpenTk_Preserved ()
{
-#if XAMCORE_2_0
const string OpenTKAssembly = "OpenTK-1.0";
-#else
- const string OpenTKAssembly = "OpenTK";
-#endif
var gl = GetTypeHelper ("OpenTK.Graphics.ES11.GL, " + OpenTKAssembly, false);
Assert.NotNull (gl, "ES11/GL");
var core = GetTypeHelper ("OpenTK.Graphics.ES11.GL/Core, " + OpenTKAssembly, false);
@@ -482,13 +463,8 @@ namespace LinkSdk {
a.PresentModalViewController (b, true);
b.PresentModalViewController (c, true);
-#if XAMCORE_2_0
b.DismissModalViewController (true);
a.DismissModalViewController (true); //error
-#else
- b.DismissModalViewControllerAnimated (true);
- a.DismissModalViewControllerAnimated (true); //error
-#endif
}
}
#endif // !__TVOS__ && !__WATCHOS__
@@ -967,22 +943,11 @@ namespace LinkSdk {
var value = fi.GetValue (tv.WeakDelegate);
Assert.NotNull (value, "value");
-#if XAMCORE_2_0
// and on the UIScrollView defined one
tv.Scrolled += (object sender, EventArgs e) => {};
// and the existing (initial field) is still set
fi = t.GetField ("editingEnded", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull (fi, "editingEnded/scrollview");
-#else
- // In Classic UITextView also defines a Scrolled event, so make sure we get the UIScrollView one.
- ((UIScrollView) tv).Scrolled += (object sender, EventArgs e) => {};
-
- t = tv.WeakDelegate.GetType ();
- Assert.That (t.Name, Is.EqualTo ("_UIScrollViewDelegate"), "scrollview");
-
- fi = t.GetField ("editingEnded", BindingFlags.NonPublic | BindingFlags.Instance);
- Assert.Null (fi, "editingEnded/scrollview");
-#endif
}
}
#endif // !__WATCHOS__
diff --git a/tests/linker/ios/link sdk/LocaleTest.cs b/tests/linker/ios/link sdk/LocaleTest.cs
index 6ab488df75..a1a6e9d0ec 100644
--- a/tests/linker/ios/link sdk/LocaleTest.cs
+++ b/tests/linker/ios/link sdk/LocaleTest.cs
@@ -2,11 +2,7 @@
using System;
using System.Collections.Generic;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk {
diff --git a/tests/linker/ios/link sdk/Main.cs b/tests/linker/ios/link sdk/Main.cs
index c43621acb4..711a8980ad 100644
--- a/tests/linker/ios/link sdk/Main.cs
+++ b/tests/linker/ios/link sdk/Main.cs
@@ -2,13 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace LinkSdk
{
diff --git a/tests/linker/ios/link sdk/OptimizeGeneratedCodeTest.cs b/tests/linker/ios/link sdk/OptimizeGeneratedCodeTest.cs
index 69b3a858cd..a124cacb00 100644
--- a/tests/linker/ios/link sdk/OptimizeGeneratedCodeTest.cs
+++ b/tests/linker/ios/link sdk/OptimizeGeneratedCodeTest.cs
@@ -14,25 +14,12 @@ using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-#if !__WATCHOS__
-using System.Drawing;
-#endif
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using SizeF=CoreGraphics.CGSize;
-using RectangleF=CoreGraphics.CGRect;
-#endif
-
namespace Linker.Shared {
partial class NotPreserved {
@@ -103,10 +90,10 @@ namespace Linker.Shared {
[Test]
public void SingleRuntimeArchDevice ()
{
- SizeF empty = SizeF.Empty;
+ var empty = CGRect.Empty;
using (UIView v = new UIView ())
using (UIFont font = UIFont.SystemFontOfSize (12f)) {
- SizeF size = "MonoTouch".StringSize (font);
+ var size = "MonoTouch".StringSize (font);
Assert.False (size.IsEmpty, "!Empty");
}
}
@@ -120,7 +107,7 @@ namespace Linker.Shared {
[Test]
public void DoubleRuntimeArchDevice ()
{
- SizeF empty = SizeF.Empty;
+ var empty = CGSize.Empty;
using (UIView v = new UIView ()) {
Assert.True (v.SizeThatFits (empty).IsEmpty, "Empty");
}
diff --git a/tests/linker/ios/link sdk/PclTest.cs b/tests/linker/ios/link sdk/PclTest.cs
index cc4ed67c95..8f3129dda4 100644
--- a/tests/linker/ios/link sdk/PclTest.cs
+++ b/tests/linker/ios/link sdk/PclTest.cs
@@ -5,12 +5,8 @@ using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Windows.Input;
using System.Xml;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk {
diff --git a/tests/linker/ios/link sdk/ReflectionTest.cs b/tests/linker/ios/link sdk/ReflectionTest.cs
index 712fa009ff..475f99c7ed 100644
--- a/tests/linker/ios/link sdk/ReflectionTest.cs
+++ b/tests/linker/ios/link sdk/ReflectionTest.cs
@@ -2,11 +2,7 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace Linker.Shared.Reflection {
diff --git a/tests/linker/ios/link sdk/TaskTest.cs b/tests/linker/ios/link sdk/TaskTest.cs
index 8c6ef7ca7c..202053a3e6 100644
--- a/tests/linker/ios/link sdk/TaskTest.cs
+++ b/tests/linker/ios/link sdk/TaskTest.cs
@@ -3,12 +3,8 @@ using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace LinkSdk {
diff --git a/tests/linker/ios/link sdk/link sdk.csproj b/tests/linker/ios/link sdk/link sdk.csproj
index 4a65d83098..5e06f9fd26 100644
--- a/tests/linker/ios/link sdk/link sdk.csproj
+++ b/tests/linker/ios/link sdk/link sdk.csproj
@@ -12,7 +12,7 @@
link sdk
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
True
diff --git a/tests/linker/mac/dont link/dont link-mac.csproj b/tests/linker/mac/dont link/dont link-mac.csproj
index 9f7cce11bf..a155679636 100644
--- a/tests/linker/mac/dont link/dont link-mac.csproj
+++ b/tests/linker/mac/dont link/dont link-mac.csproj
@@ -13,7 +13,7 @@
obj\$(Platform)\$(Configuration)
Xamarin.Mac
x86_64
- XAMCORE_2_0
+
latest
diff --git a/tests/linker/mac/link all/link all-mac.csproj b/tests/linker/mac/link all/link all-mac.csproj
index e96594e3eb..1a2be3e1d1 100644
--- a/tests/linker/mac/link all/link all-mac.csproj
+++ b/tests/linker/mac/link all/link all-mac.csproj
@@ -18,7 +18,7 @@
full
false
bin\$(Platform)\Debug
- __UNIFIED__;__MACOS__;DEBUG
+ __MACOS__;DEBUG
prompt
4
false
@@ -39,7 +39,7 @@
true
bin\$(Platform)\Release
- __UNIFIED__;__MACOS__
+ __MACOS__
prompt
4
false
diff --git a/tests/linker/mac/link sdk/link sdk-mac.csproj b/tests/linker/mac/link sdk/link sdk-mac.csproj
index 8746bc9413..81ba515f1e 100644
--- a/tests/linker/mac/link sdk/link sdk-mac.csproj
+++ b/tests/linker/mac/link sdk/link sdk-mac.csproj
@@ -18,7 +18,7 @@
full
false
bin\$(Platform)\Debug
- __UNIFIED__;__MACOS__;DEBUG
+ __MACOS__;DEBUG
prompt
4
false
@@ -38,7 +38,7 @@
true
bin\$(Platform)\Release
- __UNIFIED__;__MACOS__
+ __MACOS__
prompt
4
false
diff --git a/tests/mmptest/mmptest.csproj b/tests/mmptest/mmptest.csproj
index e9d2b47d33..a0027c7133 100644
--- a/tests/mmptest/mmptest.csproj
+++ b/tests/mmptest/mmptest.csproj
@@ -17,14 +17,14 @@
full
false
bin\Debug
- __UNIFIED__;DEBUG;XAMCORE_2_0;MONOMAC;MMP_TEST;__MACOS__
+ DEBUG;MONOMAC;MMP_TEST;__MACOS__
prompt
0
true
bin\Release
- __UNIFIED__;XAMCORE_2_0;MONOMAC;MMP_TEST;__MACOS__
+ MONOMAC;MMP_TEST;__MACOS__
prompt
0
diff --git a/tests/mono-native/AppDelegate.cs b/tests/mono-native/AppDelegate.cs
index bc140583a9..8a86d8cdc7 100644
--- a/tests/mono-native/AppDelegate.cs
+++ b/tests/mono-native/AppDelegate.cs
@@ -2,13 +2,8 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
using NUnit.Framework.Internal;
@@ -111,11 +106,7 @@ namespace Mono.Native.Tests
View.BackgroundColor = UIColor.LightGray;
break;
}
-#if XAMCORE_2_0
NSTimer.CreateScheduledTimer (0.01, (v) => action ());
-#else
- NSTimer.CreateScheduledTimer (0.01, () => action ());
-#endif
}
}
}
diff --git a/tests/mono-native/mono-native-mac.csproj.template b/tests/mono-native/mono-native-mac.csproj.template
index 9e628acb7a..8fa0dd91b2 100644
--- a/tests/mono-native/mono-native-mac.csproj.template
+++ b/tests/mono-native/mono-native-mac.csproj.template
@@ -12,7 +12,7 @@
67,168,169,219,414,612,618,649,672
Xamarin.Mac
v2.0
- MOBILE;XAMMAC;XAMCORE_2_0
+ MOBILE;XAMMAC
false
diff --git a/tests/mono-native/mono-native.csproj.template b/tests/mono-native/mono-native.csproj.template
index 09c31c1fa8..449bae9377 100644
--- a/tests/mono-native/mono-native.csproj.template
+++ b/tests/mono-native/mono-native.csproj.template
@@ -14,7 +14,7 @@
168,169,219,414,612,618,649,672
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
True
diff --git a/tests/monotouch-test/ARKit/ARAnchorTest.cs b/tests/monotouch-test/ARKit/ARAnchorTest.cs
index 2da911e2fa..61884497a8 100644
--- a/tests/monotouch-test/ARKit/ARAnchorTest.cs
+++ b/tests/monotouch-test/ARKit/ARAnchorTest.cs
@@ -7,7 +7,7 @@
// Copyright 2018 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using ARKit;
diff --git a/tests/monotouch-test/ARKit/ARConfigurationTest.cs b/tests/monotouch-test/ARKit/ARConfigurationTest.cs
index d5804c13b2..5f017337d5 100644
--- a/tests/monotouch-test/ARKit/ARConfigurationTest.cs
+++ b/tests/monotouch-test/ARKit/ARConfigurationTest.cs
@@ -1,4 +1,4 @@
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using System.Reflection;
diff --git a/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs b/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs
index 6ea96ba295..12dd822608 100644
--- a/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs
+++ b/tests/monotouch-test/ARKit/AREnvironmentProbeAnchorTest.cs
@@ -7,7 +7,7 @@
// Copyright 2018 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using ARKit;
diff --git a/tests/monotouch-test/ARKit/ARFaceGeometryTest.cs b/tests/monotouch-test/ARKit/ARFaceGeometryTest.cs
index 655c22c1e7..e66907fb42 100644
--- a/tests/monotouch-test/ARKit/ARFaceGeometryTest.cs
+++ b/tests/monotouch-test/ARKit/ARFaceGeometryTest.cs
@@ -7,7 +7,7 @@
// Copyright 2017 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using System.Runtime.InteropServices;
@@ -117,4 +117,4 @@ namespace MonoTouchFixtures.ARKit {
}
}
-#endif // XAMCORE_2_0 && __IOS__
+#endif // __IOS__
diff --git a/tests/monotouch-test/ARKit/ARPlaneGeometryTest.cs b/tests/monotouch-test/ARKit/ARPlaneGeometryTest.cs
index 5ea5a8cea7..d8490e3e07 100644
--- a/tests/monotouch-test/ARKit/ARPlaneGeometryTest.cs
+++ b/tests/monotouch-test/ARKit/ARPlaneGeometryTest.cs
@@ -7,7 +7,7 @@
// Copyright 2018 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using System.Runtime.InteropServices;
@@ -142,4 +142,4 @@ namespace MonoTouchFixtures.ARKit {
}
}
-#endif // XAMCORE_2_0 && __IOS__
\ No newline at end of file
+#endif // __IOS__
\ No newline at end of file
diff --git a/tests/monotouch-test/ARKit/ARPointCloudTest.cs b/tests/monotouch-test/ARKit/ARPointCloudTest.cs
index 1d2ec5650a..cf8223d831 100644
--- a/tests/monotouch-test/ARKit/ARPointCloudTest.cs
+++ b/tests/monotouch-test/ARKit/ARPointCloudTest.cs
@@ -7,7 +7,7 @@
// Copyright 2017 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using System.Runtime.InteropServices;
@@ -101,4 +101,4 @@ namespace MonoTouchFixtures.ARKit {
}
}
-#endif // XAMCORE_2_0 && __IOS__
+#endif // __IOS__
diff --git a/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs b/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs
index 453c6a17ff..ca52420838 100644
--- a/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs
+++ b/tests/monotouch-test/ARKit/ARReferenceObjectTest.cs
@@ -7,7 +7,7 @@
// Copyright 2018 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using ARKit;
diff --git a/tests/monotouch-test/ARKit/ARSkeleton2DTest.cs b/tests/monotouch-test/ARKit/ARSkeleton2DTest.cs
index ea0303ff03..7bbe01ce50 100644
--- a/tests/monotouch-test/ARKit/ARSkeleton2DTest.cs
+++ b/tests/monotouch-test/ARKit/ARSkeleton2DTest.cs
@@ -7,7 +7,7 @@
// Copyright 2019 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using System.Runtime.InteropServices;
@@ -76,4 +76,4 @@ namespace MonoTouchFixtures.ARKit {
}
}
-#endif // XAMCORE_2_0 && __IOS__
+#endif // __IOS__
diff --git a/tests/monotouch-test/ARKit/ARSkeleton3DTest.cs b/tests/monotouch-test/ARKit/ARSkeleton3DTest.cs
index 7a5dbf9fc3..4edc058b3e 100644
--- a/tests/monotouch-test/ARKit/ARSkeleton3DTest.cs
+++ b/tests/monotouch-test/ARKit/ARSkeleton3DTest.cs
@@ -7,7 +7,7 @@
// Copyright 2019 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using System.Runtime.InteropServices;
@@ -100,4 +100,4 @@ namespace MonoTouchFixtures.ARKit {
}
}
-#endif // XAMCORE_2_0 && __IOS__
+#endif // __IOS__
diff --git a/tests/monotouch-test/AVFoundation/AVAssetDownloadUrlSessionTests.cs b/tests/monotouch-test/AVFoundation/AVAssetDownloadUrlSessionTests.cs
index 16c9402c86..7ae730c295 100644
--- a/tests/monotouch-test/AVFoundation/AVAssetDownloadUrlSessionTests.cs
+++ b/tests/monotouch-test/AVFoundation/AVAssetDownloadUrlSessionTests.cs
@@ -13,13 +13,8 @@
using System;
using ObjCRuntime;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.AVFoundation;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/AVFoundation/AVAssetImageGeneratorTest.cs b/tests/monotouch-test/AVFoundation/AVAssetImageGeneratorTest.cs
index c920f9dab1..a7ecd3d9f1 100644
--- a/tests/monotouch-test/AVFoundation/AVAssetImageGeneratorTest.cs
+++ b/tests/monotouch-test/AVFoundation/AVAssetImageGeneratorTest.cs
@@ -13,28 +13,13 @@ using System;
using System.Drawing;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using AVFoundation;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.AVFoundation {
[TestFixture]
@@ -49,7 +34,7 @@ namespace MonoTouchFixtures.AVFoundation {
using (AVAssetImageGenerator aig = new AVAssetImageGenerator (video_asset)) {
Assert.Null (aig.ApertureMode, "ApertureMode");
Assert.False (aig.AppliesPreferredTrackTransform, "AppliesPreferredTrackTransform");
- Assert.That (aig.MaximumSize, Is.EqualTo (SizeF.Empty), "MaximumSize");
+ Assert.That (aig.MaximumSize, Is.EqualTo (CGSize.Empty), "MaximumSize");
Assert.True (aig.RequestedTimeToleranceAfter.IsPositiveInfinity, "RequestedTimeToleranceAfter");
Assert.True (aig.RequestedTimeToleranceBefore.IsPositiveInfinity, "RequestedTimeToleranceBefore");
}
@@ -134,27 +119,6 @@ namespace MonoTouchFixtures.AVFoundation {
Assert.True (handled, "handled");
}
-#if !XAMCORE_2_0
- [Test]
- public void GenerateCGImagesAsynchronously_Compat ()
- {
- handled = false;
- mre = new ManualResetEvent (false);
- ThreadStart main = () => {
- using (NSUrl video_url = NSUrl.FromFilename (video_asset_path))
- using (AVAsset video_asset = AVAsset.FromUrl (video_url))
- using (AVAssetImageGenerator aig = new AVAssetImageGenerator (video_asset)) {
- aig.GenerateCGImagesAsynchronously (NSValue.FromCMTime (CMTime.Zero), handler);
- mre.WaitOne ();
- }
- };
- var asyncResult = main.BeginInvoke (null, null);
- main.EndInvoke (asyncResult);
- Assert.True (mre.WaitOne (2000));
- Assert.True (handled, "handled");
- }
-#endif
-
void handler (CMTime requestedTime, IntPtr imageRef, CMTime actualTime, AVAssetImageGeneratorResult result, NSError error)
{
handled = true;
diff --git a/tests/monotouch-test/AVFoundation/AVAudioConverterPrimeInfoTest.cs b/tests/monotouch-test/AVFoundation/AVAudioConverterPrimeInfoTest.cs
index e37d4a8c42..0cd9d00471 100644
--- a/tests/monotouch-test/AVFoundation/AVAudioConverterPrimeInfoTest.cs
+++ b/tests/monotouch-test/AVFoundation/AVAudioConverterPrimeInfoTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/AVBeatRangeTest.cs b/tests/monotouch-test/AVFoundation/AVBeatRangeTest.cs
index 8d6c13d7f1..98ac9151d1 100644
--- a/tests/monotouch-test/AVFoundation/AVBeatRangeTest.cs
+++ b/tests/monotouch-test/AVFoundation/AVBeatRangeTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/AVCapturePhotoBracketSettingsTest.cs b/tests/monotouch-test/AVFoundation/AVCapturePhotoBracketSettingsTest.cs
index 6219b2436c..02bf9fc76a 100644
--- a/tests/monotouch-test/AVFoundation/AVCapturePhotoBracketSettingsTest.cs
+++ b/tests/monotouch-test/AVFoundation/AVCapturePhotoBracketSettingsTest.cs
@@ -1,4 +1,4 @@
-#if XAMCORE_2_0 && !__WATCHOS__ && !__TVOS__ && !MONOMAC
+#if !__WATCHOS__ && !__TVOS__ && !MONOMAC
using System;
using Foundation;
diff --git a/tests/monotouch-test/AVFoundation/AVCaptureWhiteBalanceGainsTest.cs b/tests/monotouch-test/AVFoundation/AVCaptureWhiteBalanceGainsTest.cs
index 23cf91029f..5a5f042558 100644
--- a/tests/monotouch-test/AVFoundation/AVCaptureWhiteBalanceGainsTest.cs
+++ b/tests/monotouch-test/AVFoundation/AVCaptureWhiteBalanceGainsTest.cs
@@ -1,12 +1,7 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs b/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs
index b097c26ad9..1a40551735 100644
--- a/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs
+++ b/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs
@@ -8,7 +8,7 @@
// Copyright 2017 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0 && !__WATCHOS__
+#if !__WATCHOS__
using System;
using NUnit.Framework;
diff --git a/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs b/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs
index f8089aee70..0e025bcaae 100644
--- a/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs
+++ b/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs
@@ -1,13 +1,8 @@
#if !__WATCHOS__
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace monotouchtest.AVFoundation
{
diff --git a/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs b/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs
index 49c3a986bc..35e807fdaf 100644
--- a/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs
+++ b/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs
@@ -11,13 +11,8 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/AudioRecorderTest.cs b/tests/monotouch-test/AVFoundation/AudioRecorderTest.cs
index 1bf7917f48..f4598e6c07 100644
--- a/tests/monotouch-test/AVFoundation/AudioRecorderTest.cs
+++ b/tests/monotouch-test/AVFoundation/AudioRecorderTest.cs
@@ -6,15 +6,9 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.AudioToolbox;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/CaptureDeviceTest.cs b/tests/monotouch-test/AVFoundation/CaptureDeviceTest.cs
index bfd4fcbbba..b29575844b 100644
--- a/tests/monotouch-test/AVFoundation/CaptureDeviceTest.cs
+++ b/tests/monotouch-test/AVFoundation/CaptureDeviceTest.cs
@@ -1,13 +1,8 @@
#if __IOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs b/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs
index ec1f68d403..124795ef1a 100644
--- a/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs
+++ b/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs
@@ -14,29 +14,13 @@ using System.Drawing;
using System.IO;
using System.Reflection;
using System.Threading;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using AVFoundation;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.AVFoundation {
[TestFixture]
@@ -47,7 +31,6 @@ namespace MonoTouchFixtures.AVFoundation {
public void Defaults ()
{
using (var obj = new AVCaptureMetadataOutput ()) {
-#if XAMCORE_2_0
Assert.AreEqual (AVMetadataObjectType.None, obj.AvailableMetadataObjectTypes, "AvailableMetadataObjectTypes");
Assert.AreEqual (AVMetadataObjectType.None, obj.MetadataObjectTypes, "MetadataObjectTypes");
@@ -55,25 +38,13 @@ namespace MonoTouchFixtures.AVFoundation {
Assert.AreEqual (0, obj.WeakAvailableMetadataObjectTypes.Length, "WeakAvailableMetadataObjectTypes#");
Assert.IsNotNull (obj.WeakMetadataObjectTypes, "WeakMetadataObjectTypes");
Assert.AreEqual (0, obj.WeakMetadataObjectTypes.Length, "WeakMetadataObjectTypes#");
-#else
- Assert.IsNotNull (obj.AvailableMetadataObjectTypes, "AvailableMetadataObjectTypes");
- Assert.AreEqual (0, obj.AvailableMetadataObjectTypes.Length, "AvailableMetadataObjectTypes#");
- Assert.IsNotNull (obj.MetadataObjectTypes, "MetadataObjectTypes");
- Assert.AreEqual (0, obj.MetadataObjectTypes.Length, "MetadataObjectTypes#");
-#endif
if (TestRuntime.CheckSystemVersion (PlatformName.iOS, 7, 0, throwIfOtherPlatform: false))
- Assert.AreEqual (new RectangleF (0, 0, 1, 1), obj.RectOfInterest, "RectOfInterest");
+ Assert.AreEqual (new CGRect (0, 0, 1, 1), obj.RectOfInterest, "RectOfInterest");
-#if XAMCORE_2_0
obj.WeakMetadataObjectTypes = null;
Assert.AreEqual (AVMetadataObjectType.None, obj.MetadataObjectTypes, "MetadataObjectTypes");
obj.MetadataObjectTypes = AVMetadataObjectType.None;
Assert.AreEqual (AVMetadataObjectType.None, obj.MetadataObjectTypes, "MetadataObjectTypes");
-#else
- obj.MetadataObjectTypes = null;
- Assert.IsNotNull (obj.MetadataObjectTypes, "MetadataObjectTypes");
- Assert.AreEqual (0, obj.MetadataObjectTypes.Length, "MetadataObjectTypes#");
-#endif
obj.SetDelegate (null, null);
}
}
@@ -118,7 +89,6 @@ namespace MonoTouchFixtures.AVFoundation {
}
}
-#if XAMCORE_2_0
[Test]
public void MetadataObjectTypesTest ()
{
@@ -165,7 +135,6 @@ namespace MonoTouchFixtures.AVFoundation {
}
}
}
-#endif
}
}
diff --git a/tests/monotouch-test/AVFoundation/MetadataObjectTest.cs b/tests/monotouch-test/AVFoundation/MetadataObjectTest.cs
index e94ef052cd..7a39d3d175 100644
--- a/tests/monotouch-test/AVFoundation/MetadataObjectTest.cs
+++ b/tests/monotouch-test/AVFoundation/MetadataObjectTest.cs
@@ -13,28 +13,12 @@ using System;
using System.Drawing;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.AVFoundation {
[TestFixture]
@@ -51,14 +35,10 @@ namespace MonoTouchFixtures.AVFoundation {
Assert.AreEqual (0, obj.FaceID, "FaceID");
Assert.AreEqual (false, obj.HasRollAngle, "HasRollAngle");
Assert.AreEqual (false, obj.HasYawAngle, "HasYawAngle");
-#if XAMCORE_2_0
#if !MONOMAC // No Type property for Mac
Assert.AreEqual (AVMetadataObjectType.Face, obj.Type, "Type");
#endif
Assert.AreEqual (AVMetadataObject.TypeFace, obj.WeakType, "WeakType");
-#else
- Assert.AreEqual (AVMetadataObject.TypeFace, obj.Type, "Type");
-#endif
}
#if !MONOMAC // iOS only
@@ -66,12 +46,8 @@ namespace MonoTouchFixtures.AVFoundation {
Assert.IsNotNull (obj.Corners, "Corners");
Assert.AreEqual (0, obj.Corners.Length, "Corners");
Assert.IsNull (obj.StringValue, "StringValue");
-#if XAMCORE_2_0
Assert.AreEqual (AVMetadataObjectType.None, obj.Type, "Type");
Assert.IsNull (obj.WeakType, "WeakType");
-#else
- Assert.IsNull (obj.Type, "Type");
-#endif
}
#endif
}
diff --git a/tests/monotouch-test/AVFoundation/PlayerItemTest.cs b/tests/monotouch-test/AVFoundation/PlayerItemTest.cs
index 2c4110b7be..c791c7e6d7 100644
--- a/tests/monotouch-test/AVFoundation/PlayerItemTest.cs
+++ b/tests/monotouch-test/AVFoundation/PlayerItemTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using AVFoundation;
using Foundation;
#if MONOMAC
@@ -18,11 +17,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs b/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs
index eef822ea8e..1cb782be4c 100644
--- a/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs
+++ b/tests/monotouch-test/AVFoundation/PlayerItemVideoOutputTest.cs
@@ -10,16 +10,10 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using AVFoundation;
using CoreVideo;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreVideo;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/QueuePlayerTest.cs b/tests/monotouch-test/AVFoundation/QueuePlayerTest.cs
index 927a45e654..a3a7f787db 100644
--- a/tests/monotouch-test/AVFoundation/QueuePlayerTest.cs
+++ b/tests/monotouch-test/AVFoundation/QueuePlayerTest.cs
@@ -11,13 +11,8 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/SpeechSynthesisVoiceTest.cs b/tests/monotouch-test/AVFoundation/SpeechSynthesisVoiceTest.cs
index 8719b212d8..24f32fc682 100644
--- a/tests/monotouch-test/AVFoundation/SpeechSynthesisVoiceTest.cs
+++ b/tests/monotouch-test/AVFoundation/SpeechSynthesisVoiceTest.cs
@@ -10,7 +10,6 @@
#if !MONOMAC
using System;
using System.Drawing;
-#if XAMCORE_2_0
using AVFoundation;
using Foundation;
using ObjCRuntime;
@@ -19,12 +18,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVFoundation/UtilitiesTest.cs b/tests/monotouch-test/AVFoundation/UtilitiesTest.cs
index 7d77a5069e..1e5133ac04 100644
--- a/tests/monotouch-test/AVFoundation/UtilitiesTest.cs
+++ b/tests/monotouch-test/AVFoundation/UtilitiesTest.cs
@@ -12,7 +12,7 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
#if MONOMAC
using AppKit;
@@ -20,23 +20,8 @@ using AppKit;
using UIKit;
#endif
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.AVFoundation {
[TestFixture]
@@ -47,7 +32,7 @@ namespace MonoTouchFixtures.AVFoundation {
[Test]
public void AspectRatio ()
{
- var r = RectangleF.Empty.WithAspectRatio (SizeF.Empty);
+ var r = CGRect.Empty.WithAspectRatio (CGSize.Empty);
Assert.True (nfloat.IsNaN (r.Top), "Top");
Assert.That (nfloat.IsNaN (r.Left), "Left");
Assert.That (nfloat.IsNaN (r.Width), "Width");
diff --git a/tests/monotouch-test/AVFoundation/VideoCompositionInstructionTest.cs b/tests/monotouch-test/AVFoundation/VideoCompositionInstructionTest.cs
index 352ea98dc9..516a28c008 100644
--- a/tests/monotouch-test/AVFoundation/VideoCompositionInstructionTest.cs
+++ b/tests/monotouch-test/AVFoundation/VideoCompositionInstructionTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -18,11 +17,6 @@ using AppKit;
using UIKit;
#endif
using AVFoundation;
-#else
-using MonoTouch.AVFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVFoundation {
diff --git a/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs b/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs
index 10518c3b39..73b8e9a3cb 100644
--- a/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs
+++ b/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs
@@ -10,18 +10,11 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using AVKit;
using Foundation;
using UIKit;
using iAd;
using ObjCRuntime;
-#else
-using MonoTouch.AVKit;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.iAd;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AVKit {
diff --git a/tests/monotouch-test/AdSupport/IdentifierManagerTest.cs b/tests/monotouch-test/AdSupport/IdentifierManagerTest.cs
index 34c68c0808..433bb4bd95 100644
--- a/tests/monotouch-test/AdSupport/IdentifierManagerTest.cs
+++ b/tests/monotouch-test/AdSupport/IdentifierManagerTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using AdSupport;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.AdSupport;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AdSupport {
diff --git a/tests/monotouch-test/AddressBook/AddressBookTest.cs b/tests/monotouch-test/AddressBook/AddressBookTest.cs
index a7b7bbe293..d58a780b2b 100644
--- a/tests/monotouch-test/AddressBook/AddressBookTest.cs
+++ b/tests/monotouch-test/AddressBook/AddressBookTest.cs
@@ -10,17 +10,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using AddressBook;
using ObjCRuntime;
-#else
-using MonoTouch.AddressBook;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AddressBook {
diff --git a/tests/monotouch-test/AddressBook/PersonTest.cs b/tests/monotouch-test/AddressBook/PersonTest.cs
index 63706ae291..c88c1a41d0 100644
--- a/tests/monotouch-test/AddressBook/PersonTest.cs
+++ b/tests/monotouch-test/AddressBook/PersonTest.cs
@@ -10,17 +10,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using AddressBook;
using ObjCRuntime;
-#else
-using MonoTouch.AddressBook;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AddressBook {
diff --git a/tests/monotouch-test/AddressBook/SourceTest.cs b/tests/monotouch-test/AddressBook/SourceTest.cs
index 42288ac455..d6f28f48f5 100644
--- a/tests/monotouch-test/AddressBook/SourceTest.cs
+++ b/tests/monotouch-test/AddressBook/SourceTest.cs
@@ -10,17 +10,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using AddressBook;
using ObjCRuntime;
-#else
-using MonoTouch.AddressBook;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AddressBook {
diff --git a/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs b/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs
index c20ecb3b29..99d2615925 100644
--- a/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs
+++ b/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs
@@ -11,17 +11,10 @@
using System;
using System.Globalization;
-#if XAMCORE_2_0
using Foundation;
using AddressBookUI;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.AddressBookUI;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AddressBookUI {
diff --git a/tests/monotouch-test/AppDelegate.cs b/tests/monotouch-test/AppDelegate.cs
index 23af9ad2b0..331ab3348b 100644
--- a/tests/monotouch-test/AppDelegate.cs
+++ b/tests/monotouch-test/AppDelegate.cs
@@ -2,13 +2,8 @@
using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using MonoTouch.NUnit.UI;
using NUnit.Framework.Internal;
using MonoTouchFixtures.BackgroundTasks;
@@ -125,11 +120,7 @@ namespace MonoTouchFixtures {
imgView.ContentMode = UIViewContentMode.Center;
View.AddSubview (imgView);
}
-#if XAMCORE_2_0
NSTimer.CreateScheduledTimer (0.01, (v) => action ());
-#else
- NSTimer.CreateScheduledTimer (0.01, () => action ());
-#endif
}
}
}
diff --git a/tests/monotouch-test/Asserts.cs b/tests/monotouch-test/Asserts.cs
index 67d04a5afc..85fd62bdd6 100644
--- a/tests/monotouch-test/Asserts.cs
+++ b/tests/monotouch-test/Asserts.cs
@@ -1,12 +1,8 @@
using System;
-#if XAMCORE_2_0
#if !__WATCHOS__
using ModelIO;
using MetalPerformanceShaders;
#endif
-#else
-using MonoTouch.ModelIO;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
using MatrixFloat3x3 = global::OpenTK.NMatrix3;
diff --git a/tests/monotouch-test/AudioToolbox/AudioBalanceFadeTest.cs b/tests/monotouch-test/AudioToolbox/AudioBalanceFadeTest.cs
index 7ac2aabb3d..f35f39cc46 100644
--- a/tests/monotouch-test/AudioToolbox/AudioBalanceFadeTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioBalanceFadeTest.cs
@@ -11,16 +11,9 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/AudioToolbox/AudioChannelLayoutTest.cs b/tests/monotouch-test/AudioToolbox/AudioChannelLayoutTest.cs
index ef954ee5e6..363dbc676e 100644
--- a/tests/monotouch-test/AudioToolbox/AudioChannelLayoutTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioChannelLayoutTest.cs
@@ -11,16 +11,9 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs b/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs
index 16e8954c13..300b2b8acd 100644
--- a/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs
@@ -5,17 +5,10 @@ using System;
using System.Drawing;
using System.IO;
using System.Collections.Generic;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using AudioUnit;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/AudioFileGlobalInfoTest.cs b/tests/monotouch-test/AudioToolbox/AudioFileGlobalInfoTest.cs
index 8a9e3d7f6b..076c23ae24 100644
--- a/tests/monotouch-test/AudioToolbox/AudioFileGlobalInfoTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioFileGlobalInfoTest.cs
@@ -11,16 +11,9 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/AudioToolbox/AudioFileStreamTest.cs b/tests/monotouch-test/AudioToolbox/AudioFileStreamTest.cs
index 81e126fc23..1ce60f77b4 100644
--- a/tests/monotouch-test/AudioToolbox/AudioFileStreamTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioFileStreamTest.cs
@@ -11,15 +11,9 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/AudioFileTest.cs b/tests/monotouch-test/AudioToolbox/AudioFileTest.cs
index 7563ea9de3..20b4c2d7c7 100644
--- a/tests/monotouch-test/AudioToolbox/AudioFileTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioFileTest.cs
@@ -5,16 +5,9 @@
using System;
using System.Drawing;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/AudioFormatAvailabilityTest.cs b/tests/monotouch-test/AudioToolbox/AudioFormatAvailabilityTest.cs
index bfcc6d95ec..69c06cf024 100644
--- a/tests/monotouch-test/AudioToolbox/AudioFormatAvailabilityTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioFormatAvailabilityTest.cs
@@ -9,13 +9,8 @@
#if !__WATCHOS__
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.AudioToolbox;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/AudioFormatTest.cs b/tests/monotouch-test/AudioToolbox/AudioFormatTest.cs
index 94ab439710..c86a7669bc 100644
--- a/tests/monotouch-test/AudioToolbox/AudioFormatTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioFormatTest.cs
@@ -11,16 +11,9 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs b/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs
index 5a2f68e2e8..f90127c325 100644
--- a/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs
@@ -11,16 +11,9 @@
using System;
using System.Collections.Generic;
-#if XAMCORE_2_0
using Foundation;
using AVFoundation;
using AudioToolbox;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/AudioSessionTest.cs b/tests/monotouch-test/AudioToolbox/AudioSessionTest.cs
index 4ae61b5758..f255f4fef4 100644
--- a/tests/monotouch-test/AudioToolbox/AudioSessionTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioSessionTest.cs
@@ -4,17 +4,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using AudioToolbox;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/AudioStreamBasicDescriptionTest.cs b/tests/monotouch-test/AudioToolbox/AudioStreamBasicDescriptionTest.cs
index 2ed40dc729..477d6f34ad 100644
--- a/tests/monotouch-test/AudioToolbox/AudioStreamBasicDescriptionTest.cs
+++ b/tests/monotouch-test/AudioToolbox/AudioStreamBasicDescriptionTest.cs
@@ -11,16 +11,9 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/AudioToolbox/FourCCTest.cs b/tests/monotouch-test/AudioToolbox/FourCCTest.cs
index ea774e6f59..72a78ee30d 100644
--- a/tests/monotouch-test/AudioToolbox/FourCCTest.cs
+++ b/tests/monotouch-test/AudioToolbox/FourCCTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using ObjCRuntime;
-#else
-using MonoTouch.AudioToolbox;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/MusicSequenceTest.cs b/tests/monotouch-test/AudioToolbox/MusicSequenceTest.cs
index 59265dc9df..441adabf68 100644
--- a/tests/monotouch-test/AudioToolbox/MusicSequenceTest.cs
+++ b/tests/monotouch-test/AudioToolbox/MusicSequenceTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using AudioToolbox;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.AudioToolbox;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/MusicTrackTest.cs b/tests/monotouch-test/AudioToolbox/MusicTrackTest.cs
index 09fa6a512a..17a5f19500 100644
--- a/tests/monotouch-test/AudioToolbox/MusicTrackTest.cs
+++ b/tests/monotouch-test/AudioToolbox/MusicTrackTest.cs
@@ -10,17 +10,10 @@
#if !__WATCHOS__ && !MONOMAC && !__TVOS__
using System;
-#if XAMCORE_2_0
using AudioToolbox;
using Foundation;
using ObjCRuntime;
using CoreMidi;
-#else
-using MonoTouch.AudioToolbox;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.CoreMidi;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.AudioToolbox {
diff --git a/tests/monotouch-test/AudioToolbox/SoundBankTest.cs b/tests/monotouch-test/AudioToolbox/SoundBankTest.cs
index cec01948cc..2d786af00d 100644
--- a/tests/monotouch-test/AudioToolbox/SoundBankTest.cs
+++ b/tests/monotouch-test/AudioToolbox/SoundBankTest.cs
@@ -10,30 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.AudioToolbox {
[TestFixture]
diff --git a/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs b/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs
index 6c371b1ac0..fb30339e15 100644
--- a/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs
+++ b/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs
@@ -11,18 +11,10 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using AudioToolbox;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.AudioToolbox;
-using MonoTouch.CoreFoundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/AudioUnit/AUAudioUnitFactoryTest.cs b/tests/monotouch-test/AudioUnit/AUAudioUnitFactoryTest.cs
index 788a1b087f..45255206e0 100644
--- a/tests/monotouch-test/AudioUnit/AUAudioUnitFactoryTest.cs
+++ b/tests/monotouch-test/AudioUnit/AUAudioUnitFactoryTest.cs
@@ -7,7 +7,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
@@ -61,4 +61,4 @@ namespace MonoTouchFixtures.AudioUnit {
}
}
-#endif // !__WATCHOS__ && XAMCORE_2_0
+#endif // !__WATCHOS__
diff --git a/tests/monotouch-test/AudioUnit/AUGraphTest.cs b/tests/monotouch-test/AudioUnit/AUGraphTest.cs
index 64d47246c1..6bbc9d097a 100644
--- a/tests/monotouch-test/AudioUnit/AUGraphTest.cs
+++ b/tests/monotouch-test/AudioUnit/AUGraphTest.cs
@@ -12,16 +12,9 @@ using System;
using System.Runtime.InteropServices;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using AudioUnit;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.AudioUnit;
-using MonoTouch.ObjCRuntime;
-#endif
namespace MonoTouchFixtures.AudioUnit {
diff --git a/tests/monotouch-test/AudioUnit/AUParameterNodeTest.cs b/tests/monotouch-test/AudioUnit/AUParameterNodeTest.cs
index 7b63cc0035..5fa7764155 100644
--- a/tests/monotouch-test/AudioUnit/AUParameterNodeTest.cs
+++ b/tests/monotouch-test/AudioUnit/AUParameterNodeTest.cs
@@ -7,7 +7,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using System.Threading;
@@ -184,4 +184,4 @@ namespace monotouchtest {
}
}
-#endif // !__WATCHOS__ && XAMCORE_2_0
+#endif // !__WATCHOS__
diff --git a/tests/monotouch-test/AudioUnit/AudioUnitTest.cs b/tests/monotouch-test/AudioUnit/AudioUnitTest.cs
index 926f1ac75d..6eb8a6dd94 100644
--- a/tests/monotouch-test/AudioUnit/AudioUnitTest.cs
+++ b/tests/monotouch-test/AudioUnit/AudioUnitTest.cs
@@ -8,19 +8,10 @@ using System;
using NUnit.Framework;
using System.Runtime.InteropServices;
-
-#if XAMCORE_2_0
using Foundation;
using AudioUnit;
using AudioToolbox;
using ObjCRuntime;
-#else
-using MonoTouch.AudioUnit;
-using MonoTouch.AudioToolbox;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch;
-#endif
namespace MonoTouchFixtures.AudioUnit
{
diff --git a/tests/monotouch-test/AudioUnit/ExtAudioFileTest.cs b/tests/monotouch-test/AudioUnit/ExtAudioFileTest.cs
index 472bb305c1..f683f799c2 100644
--- a/tests/monotouch-test/AudioUnit/ExtAudioFileTest.cs
+++ b/tests/monotouch-test/AudioUnit/ExtAudioFileTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using AudioUnit;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.AudioUnit;
-using MonoTouch.CoreFoundation;
-#endif
using System.IO;
namespace MonoTouchFixtures.AudioUnit {
diff --git a/tests/monotouch-test/CloudKit/CKDiscoverUserInfosOperationTest.cs b/tests/monotouch-test/CloudKit/CKDiscoverUserInfosOperationTest.cs
index eb8ce24061..fa05190b58 100644
--- a/tests/monotouch-test/CloudKit/CKDiscoverUserInfosOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKDiscoverUserInfosOperationTest.cs
@@ -1,14 +1,9 @@
#if !__WATCHOS__
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs b/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs
index 6f823f948c..e09de4bd68 100644
--- a/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKFetchNotificationChangesOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKFetchRecordChangesOperationTest.cs b/tests/monotouch-test/CloudKit/CKFetchRecordChangesOperationTest.cs
index f3a4f386c4..e923013d27 100644
--- a/tests/monotouch-test/CloudKit/CKFetchRecordChangesOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKFetchRecordChangesOperationTest.cs
@@ -1,14 +1,9 @@
#if !__WATCHOS__
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKFetchRecordZonesOperationTest.cs b/tests/monotouch-test/CloudKit/CKFetchRecordZonesOperationTest.cs
index 1225a7056e..8c98253b1c 100644
--- a/tests/monotouch-test/CloudKit/CKFetchRecordZonesOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKFetchRecordZonesOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKFetchRecordsOperationTest.cs b/tests/monotouch-test/CloudKit/CKFetchRecordsOperationTest.cs
index b321a65d51..c922d6e1fb 100644
--- a/tests/monotouch-test/CloudKit/CKFetchRecordsOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKFetchRecordsOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKFetchSubscriptionsOperationTest.cs b/tests/monotouch-test/CloudKit/CKFetchSubscriptionsOperationTest.cs
index 5c50cf0007..828dd651d7 100644
--- a/tests/monotouch-test/CloudKit/CKFetchSubscriptionsOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKFetchSubscriptionsOperationTest.cs
@@ -1,14 +1,9 @@
#if !__WATCHOS__
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs b/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs
index d134e9b9ea..d64e63f3ae 100644
--- a/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKMarkNotificationsReadOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs b/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs
index e263b20977..8b6c71f9b3 100644
--- a/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKModifyBadgeOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKModifyRecordZonesOperationTest.cs b/tests/monotouch-test/CloudKit/CKModifyRecordZonesOperationTest.cs
index 48cce942fb..bd1aa21a77 100644
--- a/tests/monotouch-test/CloudKit/CKModifyRecordZonesOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKModifyRecordZonesOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKModifyRecordsOperationTest.cs b/tests/monotouch-test/CloudKit/CKModifyRecordsOperationTest.cs
index 7d1b6558f1..f9fecbf962 100644
--- a/tests/monotouch-test/CloudKit/CKModifyRecordsOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKModifyRecordsOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKModifySubscriptionsOperationTest.cs b/tests/monotouch-test/CloudKit/CKModifySubscriptionsOperationTest.cs
index 372196a3ae..91105e4819 100644
--- a/tests/monotouch-test/CloudKit/CKModifySubscriptionsOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKModifySubscriptionsOperationTest.cs
@@ -1,14 +1,9 @@
#if !__WATCHOS__
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKQueryOperationTest.cs b/tests/monotouch-test/CloudKit/CKQueryOperationTest.cs
index 43ee29a8e3..933d67a5d8 100644
--- a/tests/monotouch-test/CloudKit/CKQueryOperationTest.cs
+++ b/tests/monotouch-test/CloudKit/CKQueryOperationTest.cs
@@ -1,13 +1,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CloudKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CloudKit;
-#endif
namespace MonoTouchFixtures.CloudKit
{
diff --git a/tests/monotouch-test/CloudKit/CKUserIdentityLookupInfoTest.cs b/tests/monotouch-test/CloudKit/CKUserIdentityLookupInfoTest.cs
index a81197a48b..262719d001 100644
--- a/tests/monotouch-test/CloudKit/CKUserIdentityLookupInfoTest.cs
+++ b/tests/monotouch-test/CloudKit/CKUserIdentityLookupInfoTest.cs
@@ -1,4 +1,3 @@
-#if XAMCORE_2_0
using System;
using NUnit.Framework;
using Foundation;
@@ -70,4 +69,3 @@ namespace MonoTouchFixtures.CloudKit
}
}
}
-#endif
diff --git a/tests/monotouch-test/Contacts/ContactFetchRequestTest.cs b/tests/monotouch-test/Contacts/ContactFetchRequestTest.cs
index bb092be13d..5fe028583b 100644
--- a/tests/monotouch-test/Contacts/ContactFetchRequestTest.cs
+++ b/tests/monotouch-test/Contacts/ContactFetchRequestTest.cs
@@ -8,19 +8,11 @@
//
#if !__TVOS__
-#if XAMCORE_2_0 // The Contacts framework is Unified only
using System;
-#if XAMCORE_2_0
using Contacts;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Contacts;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Contacts {
@@ -65,5 +57,4 @@ namespace MonoTouchFixtures.Contacts {
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
diff --git a/tests/monotouch-test/Contacts/ContactFormatterTest.cs b/tests/monotouch-test/Contacts/ContactFormatterTest.cs
index d2fd1ad561..8e29eaa38d 100644
--- a/tests/monotouch-test/Contacts/ContactFormatterTest.cs
+++ b/tests/monotouch-test/Contacts/ContactFormatterTest.cs
@@ -8,19 +8,11 @@
//
#if !__TVOS__
-#if XAMCORE_2_0 // The Contacts framework is Unified only
using System;
-#if XAMCORE_2_0
using Contacts;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Contacts;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Contacts {
@@ -59,5 +51,4 @@ namespace MonoTouchFixtures.Contacts {
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
diff --git a/tests/monotouch-test/Contacts/ContactStoreTest.cs b/tests/monotouch-test/Contacts/ContactStoreTest.cs
index ff3d716c75..39640f4cd1 100644
--- a/tests/monotouch-test/Contacts/ContactStoreTest.cs
+++ b/tests/monotouch-test/Contacts/ContactStoreTest.cs
@@ -8,18 +8,11 @@
//
#if !__TVOS__
-#if XAMCORE_2_0 // The Contacts framework is Unified only
using System;
-#if XAMCORE_2_0
using Contacts;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Contacts {
@@ -82,5 +75,4 @@ namespace MonoTouchFixtures.Contacts {
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
diff --git a/tests/monotouch-test/Contacts/ContactTest.cs b/tests/monotouch-test/Contacts/ContactTest.cs
index e810338450..a4f2432503 100644
--- a/tests/monotouch-test/Contacts/ContactTest.cs
+++ b/tests/monotouch-test/Contacts/ContactTest.cs
@@ -8,19 +8,11 @@
//
#if !__TVOS__
-#if XAMCORE_2_0 // The Contacts framework is Unified only
using System;
-#if XAMCORE_2_0
using Contacts;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Contacts;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Contacts {
@@ -85,5 +77,4 @@ namespace MonoTouchFixtures.Contacts {
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
diff --git a/tests/monotouch-test/Contacts/ContactVCardSerializationTest.cs b/tests/monotouch-test/Contacts/ContactVCardSerializationTest.cs
index a11c6a891e..95073fe896 100644
--- a/tests/monotouch-test/Contacts/ContactVCardSerializationTest.cs
+++ b/tests/monotouch-test/Contacts/ContactVCardSerializationTest.cs
@@ -8,19 +8,11 @@
//
#if !__TVOS__
-#if XAMCORE_2_0 // The Contacts framework is Unified only
using System;
-#if XAMCORE_2_0
using Contacts;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Contacts;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Contacts {
@@ -49,5 +41,4 @@ namespace MonoTouchFixtures.Contacts {
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
diff --git a/tests/monotouch-test/Contacts/MutableContactTest.cs b/tests/monotouch-test/Contacts/MutableContactTest.cs
index f1cf02d2ea..c979904ce7 100644
--- a/tests/monotouch-test/Contacts/MutableContactTest.cs
+++ b/tests/monotouch-test/Contacts/MutableContactTest.cs
@@ -9,19 +9,10 @@
#if !__TVOS__
-#if XAMCORE_2_0
-
using System;
-#if XAMCORE_2_0
using Contacts;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Contacts;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Contacts {
@@ -182,5 +173,4 @@ namespace MonoTouchFixtures.Contacts {
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
diff --git a/tests/monotouch-test/CoreAnimation/CATextLayerTests.cs b/tests/monotouch-test/CoreAnimation/CATextLayerTests.cs
index c3a434c826..985c93f05c 100644
--- a/tests/monotouch-test/CoreAnimation/CATextLayerTests.cs
+++ b/tests/monotouch-test/CoreAnimation/CATextLayerTests.cs
@@ -13,13 +13,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using CoreAnimation;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.CoreAnimation {
[TestFixture]
diff --git a/tests/monotouch-test/CoreAnimation/EmitterBehaviorTest.cs b/tests/monotouch-test/CoreAnimation/EmitterBehaviorTest.cs
index b0ed4639b1..b5e0775c11 100644
--- a/tests/monotouch-test/CoreAnimation/EmitterBehaviorTest.cs
+++ b/tests/monotouch-test/CoreAnimation/EmitterBehaviorTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreAnimation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreAnimation {
diff --git a/tests/monotouch-test/CoreAnimation/EmitterCellTest.cs b/tests/monotouch-test/CoreAnimation/EmitterCellTest.cs
index 4823bd7e8a..cde23fb244 100644
--- a/tests/monotouch-test/CoreAnimation/EmitterCellTest.cs
+++ b/tests/monotouch-test/CoreAnimation/EmitterCellTest.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreAnimation;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreAnimation {
diff --git a/tests/monotouch-test/CoreAnimation/LayerTest.cs b/tests/monotouch-test/CoreAnimation/LayerTest.cs
index b1f85b6f52..b03ebd317b 100644
--- a/tests/monotouch-test/CoreAnimation/LayerTest.cs
+++ b/tests/monotouch-test/CoreAnimation/LayerTest.cs
@@ -14,26 +14,11 @@ using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Threading;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using CoreAnimation;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreAnimation {
[TestFixture]
@@ -84,8 +69,8 @@ namespace MonoTouchFixtures.CoreAnimation {
public void ConvertPoint ()
{
using (CALayer layer = new CALayer ()) {
- Assert.True (layer.ConvertPointFromLayer (PointF.Empty, null).IsEmpty, "From/Empty/null");
- Assert.True (layer.ConvertPointToLayer (PointF.Empty, null).IsEmpty, "To/Empty/null");
+ Assert.True (layer.ConvertPointFromLayer (CGPoint.Empty, null).IsEmpty, "From/Empty/null");
+ Assert.True (layer.ConvertPointToLayer (CGPoint.Empty, null).IsEmpty, "To/Empty/null");
}
}
@@ -93,8 +78,8 @@ namespace MonoTouchFixtures.CoreAnimation {
public void ConvertRect ()
{
using (CALayer layer = new CALayer ()) {
- Assert.True (layer.ConvertRectFromLayer (RectangleF.Empty, null).IsEmpty, "From/Empty/null");
- Assert.True (layer.ConvertRectToLayer (RectangleF.Empty, null).IsEmpty, "To/Empty/null");
+ Assert.True (layer.ConvertRectFromLayer (CGRect.Empty, null).IsEmpty, "From/Empty/null");
+ Assert.True (layer.ConvertRectToLayer (CGRect.Empty, null).IsEmpty, "To/Empty/null");
}
}
@@ -129,7 +114,7 @@ namespace MonoTouchFixtures.CoreAnimation {
const int layerCount = 50;
var thread = new Thread (() => {
- var frame = new RectangleF (0, 0, 200, 200);
+ var frame = new CGRect (0, 0, 200, 200);
using (var layer = new CALayer ()) {
for (int i = 0; i < layerCount; i++) {
TextCALayer textLayer = new TextCALayer () {
diff --git a/tests/monotouch-test/CoreAnimation/MediaTimingFunctionTest.cs b/tests/monotouch-test/CoreAnimation/MediaTimingFunctionTest.cs
index 16775c4444..0142a52ab1 100644
--- a/tests/monotouch-test/CoreAnimation/MediaTimingFunctionTest.cs
+++ b/tests/monotouch-test/CoreAnimation/MediaTimingFunctionTest.cs
@@ -11,58 +11,27 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using CoreAnimation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreMotion {
[TestFixture]
[Preserve (AllMembers = true)]
public class MediaTimingFunctionTest {
-#if !XAMCORE_2_0 // the default ctor has been removed.
- [Test]
- public void DefaultCtor ()
- {
- // invalid default .ctor exposed, now marked as [Obsolete]
- using (CAMediaTimingFunction mtf = new CAMediaTimingFunction ()) {
- // invalid instance, we only verify it does not crash when called
- Assert.True (mtf.GetControlPoint (0).IsEmpty, "0");
- Assert.True (mtf.GetControlPoint (1).IsEmpty, "1");
- Assert.True (mtf.GetControlPoint (2).IsEmpty, "2");
- Assert.True (mtf.GetControlPoint (3).IsEmpty, "3");
- Assert.That (mtf.ToString (), Is.EqualTo ("MonoTouch.CoreAnimation.CAMediaTimingFunction"), "ToString");
- }
- }
-#endif
-
[Test]
public void GetControlPoint ()
{
using (CAMediaTimingFunction mtf = CAMediaTimingFunction.FromControlPoints (0.1f, 0.2f, 0.3f, 0.4f)) {
Assert.Throws (delegate { mtf.GetControlPoint (-1); });
- Assert.That (mtf.GetControlPoint (0), Is.EqualTo (new PointF (0.0f, 0.0f)), "0");
- Assert.That (mtf.GetControlPoint (1), Is.EqualTo (new PointF (0.1f, 0.2f)), "1");
- Assert.That (mtf.GetControlPoint (2), Is.EqualTo (new PointF (0.3f, 0.4f)), "2");
- Assert.That (mtf.GetControlPoint (3), Is.EqualTo (new PointF (1.0f, 1.0f)), "3");
+ Assert.That (mtf.GetControlPoint (0), Is.EqualTo (new CGPoint (0.0f, 0.0f)), "0");
+ Assert.That (mtf.GetControlPoint (1), Is.EqualTo (new CGPoint (0.1f, 0.2f)), "1");
+ Assert.That (mtf.GetControlPoint (2), Is.EqualTo (new CGPoint (0.3f, 0.4f)), "2");
+ Assert.That (mtf.GetControlPoint (3), Is.EqualTo (new CGPoint (1.0f, 1.0f)), "3");
Assert.Throws (delegate { mtf.GetControlPoint (4); });
}
}
@@ -71,16 +40,7 @@ namespace MonoTouchFixtures.CoreMotion {
public void Default ()
{
using (CAMediaTimingFunction mtf1 = new CAMediaTimingFunction (0.25f, 0.1f, 0.25f, 1f))
-#if !XAMCORE_2_0
- using (CAMediaTimingFunction mtf2 = CAMediaTimingFunction.FromName ((string) CAMediaTimingFunction.Default))
-#endif
using (CAMediaTimingFunction mtf3 = CAMediaTimingFunction.FromName (CAMediaTimingFunction.Default)) {
-#if !XAMCORE_2_0
- Assert.That (mtf2.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0a");
- Assert.That (mtf2.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1a");
- Assert.That (mtf2.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2a");
- Assert.That (mtf2.GetControlPoint (3), Is.EqualTo (mtf1.GetControlPoint (3)), "3a");
-#endif
Assert.That (mtf3.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0b");
Assert.That (mtf3.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1b");
Assert.That (mtf3.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2b");
@@ -92,16 +52,7 @@ namespace MonoTouchFixtures.CoreMotion {
public void EaseIn ()
{
using (CAMediaTimingFunction mtf1 = new CAMediaTimingFunction (0.42f, 0f, 1f, 1f))
-#if !XAMCORE_2_0
- using (CAMediaTimingFunction mtf2 = CAMediaTimingFunction.FromName ((string) CAMediaTimingFunction.EaseIn))
-#endif
using (CAMediaTimingFunction mtf3 = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseIn)) {
-#if !XAMCORE_2_0
- Assert.That (mtf2.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0a");
- Assert.That (mtf2.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1a");
- Assert.That (mtf2.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2a");
- Assert.That (mtf2.GetControlPoint (3), Is.EqualTo (mtf1.GetControlPoint (3)), "3a");
-#endif
Assert.That (mtf3.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0b");
Assert.That (mtf3.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1b");
Assert.That (mtf3.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2b");
@@ -113,16 +64,7 @@ namespace MonoTouchFixtures.CoreMotion {
public void EaseOut ()
{
using (CAMediaTimingFunction mtf1 = new CAMediaTimingFunction (0f, 0f, 0.58f, 1f))
-#if !XAMCORE_2_0
- using (CAMediaTimingFunction mtf2 = CAMediaTimingFunction.FromName ((string) CAMediaTimingFunction.EaseOut))
-#endif
using (CAMediaTimingFunction mtf3 = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseOut)) {
-#if !XAMCORE_2_0
- Assert.That (mtf2.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0a");
- Assert.That (mtf2.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1a");
- Assert.That (mtf2.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2a");
- Assert.That (mtf2.GetControlPoint (3), Is.EqualTo (mtf1.GetControlPoint (3)), "3a");
-#endif
Assert.That (mtf3.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0b");
Assert.That (mtf3.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1b");
Assert.That (mtf3.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2b");
@@ -134,16 +76,7 @@ namespace MonoTouchFixtures.CoreMotion {
public void EaseInEaseOut ()
{
using (CAMediaTimingFunction mtf1 = new CAMediaTimingFunction (0.42f, 0f, 0.58f, 1f))
-#if !XAMCORE_2_0
- using (CAMediaTimingFunction mtf2 = CAMediaTimingFunction.FromName ((string) CAMediaTimingFunction.EaseInEaseOut))
-#endif
using (CAMediaTimingFunction mtf3 = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseInEaseOut)) {
-#if !XAMCORE_2_0
- Assert.That (mtf2.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0a");
- Assert.That (mtf2.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1a");
- Assert.That (mtf2.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2a");
- Assert.That (mtf2.GetControlPoint (3), Is.EqualTo (mtf1.GetControlPoint (3)), "3a");
-#endif
Assert.That (mtf3.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0b");
Assert.That (mtf3.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1b");
Assert.That (mtf3.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2b");
@@ -155,16 +88,7 @@ namespace MonoTouchFixtures.CoreMotion {
public void Linear ()
{
using (CAMediaTimingFunction mtf1 = new CAMediaTimingFunction (0f, 0f, 1f, 1f))
-#if !XAMCORE_2_0
- using (CAMediaTimingFunction mtf2 = CAMediaTimingFunction.FromName ((string) CAMediaTimingFunction.Linear))
-#endif
using (CAMediaTimingFunction mtf3 = CAMediaTimingFunction.FromName (CAMediaTimingFunction.Linear)) {
-#if !XAMCORE_2_0
- Assert.That (mtf2.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0a");
- Assert.That (mtf2.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1a");
- Assert.That (mtf2.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2a");
- Assert.That (mtf2.GetControlPoint (3), Is.EqualTo (mtf1.GetControlPoint (3)), "3a");
-#endif
Assert.That (mtf3.GetControlPoint (0), Is.EqualTo (mtf1.GetControlPoint (0)), "0b");
Assert.That (mtf3.GetControlPoint (1), Is.EqualTo (mtf1.GetControlPoint (1)), "1b");
Assert.That (mtf3.GetControlPoint (2), Is.EqualTo (mtf1.GetControlPoint (2)), "2b");
diff --git a/tests/monotouch-test/CoreAnimation/ShapeLayerTest.cs b/tests/monotouch-test/CoreAnimation/ShapeLayerTest.cs
index dea1adea37..c048315fd0 100644
--- a/tests/monotouch-test/CoreAnimation/ShapeLayerTest.cs
+++ b/tests/monotouch-test/CoreAnimation/ShapeLayerTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreAnimation;
using CoreGraphics;
@@ -20,12 +19,6 @@ using UIColor = AppKit.NSColor;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreAnimation {
diff --git a/tests/monotouch-test/CoreAnimation/TransactionTest.cs b/tests/monotouch-test/CoreAnimation/TransactionTest.cs
index 4bb932720a..56c4185f67 100644
--- a/tests/monotouch-test/CoreAnimation/TransactionTest.cs
+++ b/tests/monotouch-test/CoreAnimation/TransactionTest.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreAnimation;
using Foundation;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreAnimation {
diff --git a/tests/monotouch-test/CoreAudioKit/AUViewController.cs b/tests/monotouch-test/CoreAudioKit/AUViewController.cs
index 2000bda392..d612d607af 100644
--- a/tests/monotouch-test/CoreAudioKit/AUViewController.cs
+++ b/tests/monotouch-test/CoreAudioKit/AUViewController.cs
@@ -11,13 +11,8 @@
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using CoreAudioKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreAudioKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreAudioKit {
diff --git a/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs b/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs
index 0df0e5f1b9..ee87152cf1 100644
--- a/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs
+++ b/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs
@@ -11,7 +11,6 @@
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using CoreBluetooth;
using CoreFoundation;
@@ -19,12 +18,6 @@ using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch.CoreBluetooth;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreBluetooth {
diff --git a/tests/monotouch-test/CoreBluetooth/ErrorTest.cs b/tests/monotouch-test/CoreBluetooth/ErrorTest.cs
index e6c147cb71..60239977b4 100644
--- a/tests/monotouch-test/CoreBluetooth/ErrorTest.cs
+++ b/tests/monotouch-test/CoreBluetooth/ErrorTest.cs
@@ -11,13 +11,8 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreBluetooth;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreBluetooth;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreBluetooth {
diff --git a/tests/monotouch-test/CoreBluetooth/PeerTest.cs b/tests/monotouch-test/CoreBluetooth/PeerTest.cs
index 8352031f0d..05d29a63da 100644
--- a/tests/monotouch-test/CoreBluetooth/PeerTest.cs
+++ b/tests/monotouch-test/CoreBluetooth/PeerTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreBluetooth;
using ObjCRuntime;
-#else
-using MonoTouch.CoreBluetooth;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreBluetooth {
diff --git a/tests/monotouch-test/CoreBluetooth/PeripheralScanningOptionsTest.cs b/tests/monotouch-test/CoreBluetooth/PeripheralScanningOptionsTest.cs
index caa7f2614b..46509c0b0a 100644
--- a/tests/monotouch-test/CoreBluetooth/PeripheralScanningOptionsTest.cs
+++ b/tests/monotouch-test/CoreBluetooth/PeripheralScanningOptionsTest.cs
@@ -10,14 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreBluetooth;
-#else
-using MonoTouch.CoreBluetooth;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/CoreBluetooth/UuidTest.cs b/tests/monotouch-test/CoreBluetooth/UuidTest.cs
index 1da071d645..bf2a47454c 100644
--- a/tests/monotouch-test/CoreBluetooth/UuidTest.cs
+++ b/tests/monotouch-test/CoreBluetooth/UuidTest.cs
@@ -11,7 +11,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreBluetooth;
using ObjCRuntime;
@@ -20,11 +19,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreBluetooth;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/CoreData/AttributeDescriptionTest.cs b/tests/monotouch-test/CoreData/AttributeDescriptionTest.cs
index 8f60ddce77..89638e237e 100644
--- a/tests/monotouch-test/CoreData/AttributeDescriptionTest.cs
+++ b/tests/monotouch-test/CoreData/AttributeDescriptionTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreData;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreData {
@@ -36,11 +31,7 @@ namespace MonoTouchFixtures.CoreData {
{
using (var ad = new NSAttributeDescription ())
using (var o = new NSObject ()) {
-#if XAMCORE_2_0
ad.DefaultValue = o;
-#else
- ad.SetDefaultValue (o);
-#endif
Assert.AreSame (o, ad.DefaultValue, "DefaultValue");
}
}
diff --git a/tests/monotouch-test/CoreData/ExpressionDescriptionTest.cs b/tests/monotouch-test/CoreData/ExpressionDescriptionTest.cs
index eb8f7ace15..d84aee2f52 100644
--- a/tests/monotouch-test/CoreData/ExpressionDescriptionTest.cs
+++ b/tests/monotouch-test/CoreData/ExpressionDescriptionTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreData;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreData
diff --git a/tests/monotouch-test/CoreData/FetchRequestExpressionTest.cs b/tests/monotouch-test/CoreData/FetchRequestExpressionTest.cs
index 9eba27b439..66b63b1e3d 100644
--- a/tests/monotouch-test/CoreData/FetchRequestExpressionTest.cs
+++ b/tests/monotouch-test/CoreData/FetchRequestExpressionTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreData;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreData
diff --git a/tests/monotouch-test/CoreData/FetchRequestTest.cs b/tests/monotouch-test/CoreData/FetchRequestTest.cs
index 41a205688e..2c94a53efe 100644
--- a/tests/monotouch-test/CoreData/FetchRequestTest.cs
+++ b/tests/monotouch-test/CoreData/FetchRequestTest.cs
@@ -8,25 +8,10 @@
//
using System;
-#if XAMCORE_2_0
using CoreData;
using Foundation;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreData {
[TestFixture]
diff --git a/tests/monotouch-test/CoreData/FetchedResultsControllerTest.cs b/tests/monotouch-test/CoreData/FetchedResultsControllerTest.cs
index 81c7e9b7be..3c27036b13 100644
--- a/tests/monotouch-test/CoreData/FetchedResultsControllerTest.cs
+++ b/tests/monotouch-test/CoreData/FetchedResultsControllerTest.cs
@@ -10,13 +10,8 @@
#if !MONOMAC
using System;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using CoreData;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreData {
diff --git a/tests/monotouch-test/CoreData/ManagedObjectContextTest.cs b/tests/monotouch-test/CoreData/ManagedObjectContextTest.cs
index ef3d7ad018..86022c405a 100644
--- a/tests/monotouch-test/CoreData/ManagedObjectContextTest.cs
+++ b/tests/monotouch-test/CoreData/ManagedObjectContextTest.cs
@@ -8,26 +8,11 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreData;
using ObjCRuntime;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreData {
[TestFixture]
diff --git a/tests/monotouch-test/CoreData/ManagedObjectModelTest.cs b/tests/monotouch-test/CoreData/ManagedObjectModelTest.cs
index ea609b580b..0c711b7b67 100644
--- a/tests/monotouch-test/CoreData/ManagedObjectModelTest.cs
+++ b/tests/monotouch-test/CoreData/ManagedObjectModelTest.cs
@@ -8,25 +8,10 @@
//
using System;
-#if XAMCORE_2_0
using CoreData;
using Foundation;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreData {
[TestFixture]
diff --git a/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs b/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs
index 653a3acde0..00cd14db3d 100644
--- a/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs
+++ b/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using CoreData;
using Foundation;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreData
diff --git a/tests/monotouch-test/CoreData/PropertyDescriptionTest.cs b/tests/monotouch-test/CoreData/PropertyDescriptionTest.cs
index 0d84bbd4d3..2e26361ca5 100644
--- a/tests/monotouch-test/CoreData/PropertyDescriptionTest.cs
+++ b/tests/monotouch-test/CoreData/PropertyDescriptionTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreData;
-#else
-using MonoTouch.CoreData;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreData {
diff --git a/tests/monotouch-test/CoreFoundation/BundleTest.cs b/tests/monotouch-test/CoreFoundation/BundleTest.cs
index fca3809597..6cb07cb9f1 100644
--- a/tests/monotouch-test/CoreFoundation/BundleTest.cs
+++ b/tests/monotouch-test/CoreFoundation/BundleTest.cs
@@ -2,14 +2,8 @@
// Copyright 2015 Xamarin Inc
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation {
diff --git a/tests/monotouch-test/CoreFoundation/DispatchBlockTests.cs b/tests/monotouch-test/CoreFoundation/DispatchBlockTests.cs
index 0a08906dea..42390df7a4 100644
--- a/tests/monotouch-test/CoreFoundation/DispatchBlockTests.cs
+++ b/tests/monotouch-test/CoreFoundation/DispatchBlockTests.cs
@@ -11,15 +11,9 @@ using System;
using System.Net;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation
diff --git a/tests/monotouch-test/CoreFoundation/DispatchDataTest.cs b/tests/monotouch-test/CoreFoundation/DispatchDataTest.cs
index 3621b9d55b..c32eade60b 100644
--- a/tests/monotouch-test/CoreFoundation/DispatchDataTest.cs
+++ b/tests/monotouch-test/CoreFoundation/DispatchDataTest.cs
@@ -2,15 +2,9 @@
using System.Text;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation {
diff --git a/tests/monotouch-test/CoreFoundation/DispatchGroupTest.cs b/tests/monotouch-test/CoreFoundation/DispatchGroupTest.cs
index 8efd62ad3a..f8e9e9e12a 100644
--- a/tests/monotouch-test/CoreFoundation/DispatchGroupTest.cs
+++ b/tests/monotouch-test/CoreFoundation/DispatchGroupTest.cs
@@ -11,15 +11,9 @@ using System;
using System.Net;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation {
diff --git a/tests/monotouch-test/CoreFoundation/DispatchQueueTest.cs b/tests/monotouch-test/CoreFoundation/DispatchQueueTest.cs
index fc857063ac..ae038e837f 100644
--- a/tests/monotouch-test/CoreFoundation/DispatchQueueTest.cs
+++ b/tests/monotouch-test/CoreFoundation/DispatchQueueTest.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using ObjCRuntime;
@@ -18,26 +17,10 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Drawing;
using System.Threading;
-#if XAMCORE_2_0
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreFoundation
{
diff --git a/tests/monotouch-test/CoreFoundation/DispatchTests.cs b/tests/monotouch-test/CoreFoundation/DispatchTests.cs
index 277e2eb50b..9172ccc409 100644
--- a/tests/monotouch-test/CoreFoundation/DispatchTests.cs
+++ b/tests/monotouch-test/CoreFoundation/DispatchTests.cs
@@ -9,7 +9,7 @@
using System;
using System.IO;
-#if XAMCORE_2_0
+using CoreGraphics;
using CoreFoundation;
using Foundation;
using ObjCRuntime;
@@ -18,26 +18,10 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Drawing;
using System.Threading;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreFoundation {
[TestFixture]
@@ -81,7 +65,7 @@ namespace MonoTouchFixtures.CoreFoundation {
var defaultQ = DispatchQueue.GetGlobalQueue (DispatchQueuePriority.Default);
defaultQ.DispatchAsync (delegate {
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
queue_ex = e;
}
@@ -91,7 +75,7 @@ namespace MonoTouchFixtures.CoreFoundation {
mainQ.DispatchAsync (delegate {
mainQthread = Thread.CurrentThread;
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
ex = e;
} finally {
@@ -139,7 +123,7 @@ namespace MonoTouchFixtures.CoreFoundation {
var defaultQ = DispatchQueue.GetGlobalQueue (DispatchQualityOfService.Default);
defaultQ.DispatchAsync (delegate {
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
queue_ex = e;
}
@@ -149,7 +133,7 @@ namespace MonoTouchFixtures.CoreFoundation {
mainQ.DispatchAsync (delegate {
mainQthread = Thread.CurrentThread;
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
ex = e;
} finally {
@@ -299,7 +283,7 @@ namespace MonoTouchFixtures.CoreFoundation {
var defaultQ = DispatchQueue.GetGlobalQueue (DispatchQueuePriority.Default);
defaultQ.DispatchAfter (new DispatchTime (DispatchTime.Now, 1000), delegate {
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
queue_ex = e;
}
@@ -309,7 +293,7 @@ namespace MonoTouchFixtures.CoreFoundation {
mainQ.DispatchAfter (DispatchTime.Now, delegate {
mainQthread = Thread.CurrentThread;
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
ex = e;
} finally {
@@ -356,7 +340,7 @@ namespace MonoTouchFixtures.CoreFoundation {
var defaultQ = DispatchQueue.GetGlobalQueue (DispatchQualityOfService.Default);
defaultQ.DispatchAfter (new DispatchTime (DispatchTime.Now, 1000), delegate {
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
queue_ex = e;
}
@@ -366,7 +350,7 @@ namespace MonoTouchFixtures.CoreFoundation {
mainQ.DispatchAfter (DispatchTime.Now, delegate {
mainQthread = Thread.CurrentThread;
try {
- NSStringDrawing.WeakDrawString (null, PointF.Empty, null);
+ NSStringDrawing.WeakDrawString (null, CGPoint.Empty, null);
} catch (Exception e) {
ex = e;
} finally {
diff --git a/tests/monotouch-test/CoreFoundation/NetworkTest.cs b/tests/monotouch-test/CoreFoundation/NetworkTest.cs
index e9f06d2eff..86139ee666 100644
--- a/tests/monotouch-test/CoreFoundation/NetworkTest.cs
+++ b/tests/monotouch-test/CoreFoundation/NetworkTest.cs
@@ -11,13 +11,8 @@ using System;
using System.Net;
using System.Threading.Tasks;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
// Mac tries to use CFNetwork Namespace instead of Class for calls without this:
#if !__WATCHOS__
diff --git a/tests/monotouch-test/CoreFoundation/NotificationCenterTest.cs b/tests/monotouch-test/CoreFoundation/NotificationCenterTest.cs
index fbb20db719..e647ed1d13 100644
--- a/tests/monotouch-test/CoreFoundation/NotificationCenterTest.cs
+++ b/tests/monotouch-test/CoreFoundation/NotificationCenterTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation {
diff --git a/tests/monotouch-test/CoreFoundation/ProxyTest.cs b/tests/monotouch-test/CoreFoundation/ProxyTest.cs
index 5229e7c4a8..ef45119cd7 100644
--- a/tests/monotouch-test/CoreFoundation/ProxyTest.cs
+++ b/tests/monotouch-test/CoreFoundation/ProxyTest.cs
@@ -12,16 +12,9 @@ using System.Threading;
using System.IO;
using System.Net;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/CoreFoundation/StringTest.cs b/tests/monotouch-test/CoreFoundation/StringTest.cs
index ccd4e5eaa8..8493e01459 100644
--- a/tests/monotouch-test/CoreFoundation/StringTest.cs
+++ b/tests/monotouch-test/CoreFoundation/StringTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation {
diff --git a/tests/monotouch-test/CoreFoundation/UrlTest.cs b/tests/monotouch-test/CoreFoundation/UrlTest.cs
index ff7f99a2ef..3e49c49c52 100644
--- a/tests/monotouch-test/CoreFoundation/UrlTest.cs
+++ b/tests/monotouch-test/CoreFoundation/UrlTest.cs
@@ -8,15 +8,9 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreFoundation {
diff --git a/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs b/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs
index 78be07c1b5..d96518c2a6 100644
--- a/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs
+++ b/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs
@@ -11,26 +11,11 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
@@ -305,7 +290,7 @@ namespace MonoTouchFixtures.CoreGraphics {
public void TransformPoint ()
{
var transform = new CGAffineTransform (1, 2, 3, 4, 5, 6);
- var point = transform.TransformPoint (new PointF (4, 5));
+ var point = transform.TransformPoint (new CGPoint (4, 5));
Assert.AreEqual ((nfloat) 24, point.X, "X");
Assert.AreEqual ((nfloat) 34, point.Y, "Y");
@@ -315,7 +300,7 @@ namespace MonoTouchFixtures.CoreGraphics {
public void TransformRect ()
{
var transform = new CGAffineTransform (1, 2, 3, 4, 5, 6);
- var rect = transform.TransformRect (new RectangleF (4, 5, 6, 7));
+ var rect = transform.TransformRect (new CGRect (4, 5, 6, 7));
Assert.AreEqual ((nfloat) 24, rect.X, "X");
Assert.AreEqual ((nfloat) 34, rect.Y, "Y");
diff --git a/tests/monotouch-test/CoreGraphics/BitmapContextTest.cs b/tests/monotouch-test/CoreGraphics/BitmapContextTest.cs
index 89994de67b..aefdcd8103 100644
--- a/tests/monotouch-test/CoreGraphics/BitmapContextTest.cs
+++ b/tests/monotouch-test/CoreGraphics/BitmapContextTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/CGImageTest.cs b/tests/monotouch-test/CoreGraphics/CGImageTest.cs
index cfaf4e7e07..f5972967dd 100644
--- a/tests/monotouch-test/CoreGraphics/CGImageTest.cs
+++ b/tests/monotouch-test/CoreGraphics/CGImageTest.cs
@@ -11,7 +11,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -19,11 +18,6 @@ using AppKit;
using UIKit;
#endif
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/ColorConversionInfoTest.cs b/tests/monotouch-test/CoreGraphics/ColorConversionInfoTest.cs
index cdf8d6f6f0..9d92a9fe88 100644
--- a/tests/monotouch-test/CoreGraphics/ColorConversionInfoTest.cs
+++ b/tests/monotouch-test/CoreGraphics/ColorConversionInfoTest.cs
@@ -10,16 +10,9 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs b/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs
index 9cea1d0787..e1485ad1e2 100644
--- a/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs
+++ b/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -17,23 +16,8 @@ using AppKit;
using UIKit;
#endif
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/ColorTest.cs b/tests/monotouch-test/CoreGraphics/ColorTest.cs
index 28f36a221c..2d05e7c303 100644
--- a/tests/monotouch-test/CoreGraphics/ColorTest.cs
+++ b/tests/monotouch-test/CoreGraphics/ColorTest.cs
@@ -9,28 +9,11 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using CoreGraphics;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/ContextTest.cs b/tests/monotouch-test/CoreGraphics/ContextTest.cs
index c68d6da52f..29e6df5dc7 100644
--- a/tests/monotouch-test/CoreGraphics/ContextTest.cs
+++ b/tests/monotouch-test/CoreGraphics/ContextTest.cs
@@ -9,25 +9,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/DataConsumerTest.cs b/tests/monotouch-test/CoreGraphics/DataConsumerTest.cs
index 3cede24383..31658a648b 100644
--- a/tests/monotouch-test/CoreGraphics/DataConsumerTest.cs
+++ b/tests/monotouch-test/CoreGraphics/DataConsumerTest.cs
@@ -10,15 +10,9 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/DataProviderTest.cs b/tests/monotouch-test/CoreGraphics/DataProviderTest.cs
index ebf0858003..482cbf136b 100644
--- a/tests/monotouch-test/CoreGraphics/DataProviderTest.cs
+++ b/tests/monotouch-test/CoreGraphics/DataProviderTest.cs
@@ -10,15 +10,9 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/FontTest.cs b/tests/monotouch-test/CoreGraphics/FontTest.cs
index eb726c241e..94bf29c578 100644
--- a/tests/monotouch-test/CoreGraphics/FontTest.cs
+++ b/tests/monotouch-test/CoreGraphics/FontTest.cs
@@ -10,7 +10,6 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
@@ -19,12 +18,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/FunctionTest.cs b/tests/monotouch-test/CoreGraphics/FunctionTest.cs
index ddc1035f2d..21eb6a8536 100644
--- a/tests/monotouch-test/CoreGraphics/FunctionTest.cs
+++ b/tests/monotouch-test/CoreGraphics/FunctionTest.cs
@@ -10,27 +10,11 @@
#if !MONOMAC
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using UIKit;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
@@ -56,10 +40,10 @@ namespace MonoTouchFixtures.CoreGraphics {
class CustomView : UIView {
public Action Shaded;
- public unsafe override void Draw (RectangleF rect)
+ public unsafe override void Draw (CGRect rect)
{
- var start = new PointF (rect.Left, rect.Bottom);
- var end = new PointF (rect.Left, rect.Top);
+ var start = new CGPoint (rect.Left, rect.Bottom);
+ var end = new CGPoint (rect.Left, rect.Top);
var domain = new nfloat[] {0f, 1f};
var range = new nfloat[] {0f, 1f, 0f, 1f};
@@ -89,8 +73,6 @@ namespace MonoTouchFixtures.CoreGraphics {
}
}
-#if XAMCORE_2_0
-
[Test]
public void CoreGraphicsStrongDictionary ()
{
@@ -133,7 +115,6 @@ namespace MonoTouchFixtures.CoreGraphics {
}
}
-#endif // XAMCORE_2_0
#endif // !__WATCHOS__
}
}
diff --git a/tests/monotouch-test/CoreGraphics/GeometryTest.cs b/tests/monotouch-test/CoreGraphics/GeometryTest.cs
index 2d217e5fd3..82d8c03752 100644
--- a/tests/monotouch-test/CoreGraphics/GeometryTest.cs
+++ b/tests/monotouch-test/CoreGraphics/GeometryTest.cs
@@ -9,28 +9,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
@@ -39,14 +22,14 @@ namespace MonoTouchFixtures.CoreGraphics {
static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.CoreGraphicsLibrary, 0);
- public static RectangleF GetRect (string symbol)
+ public static CGRect GetRect (string symbol)
{
var indirect = Dlfcn.dlsym (Handle, symbol);
if (indirect == IntPtr.Zero)
- return RectangleF.Empty;
+ return CGRect.Empty;
unsafe {
nfloat *ptr = (nfloat *) indirect;
- return new RectangleF (ptr [0], ptr [1], ptr [2], ptr [3]);
+ return new CGRect (ptr [0], ptr [1], ptr [2], ptr [3]);
}
}
diff --git a/tests/monotouch-test/CoreGraphics/GradientTest.cs b/tests/monotouch-test/CoreGraphics/GradientTest.cs
index 1eb13cc888..071f399094 100644
--- a/tests/monotouch-test/CoreGraphics/GradientTest.cs
+++ b/tests/monotouch-test/CoreGraphics/GradientTest.cs
@@ -9,7 +9,6 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -19,24 +18,8 @@ using UIKit;
#endif
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/PDFArrayTest.cs b/tests/monotouch-test/CoreGraphics/PDFArrayTest.cs
index 2840658dba..3a68fbd181 100644
--- a/tests/monotouch-test/CoreGraphics/PDFArrayTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFArrayTest.cs
@@ -8,25 +8,10 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/PDFContentStreamTest.cs b/tests/monotouch-test/CoreGraphics/PDFContentStreamTest.cs
index 1dbace04c5..d912ed02ee 100644
--- a/tests/monotouch-test/CoreGraphics/PDFContentStreamTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFContentStreamTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/PDFContextTest.cs b/tests/monotouch-test/CoreGraphics/PDFContextTest.cs
index ee75c7929b..4b44154da8 100644
--- a/tests/monotouch-test/CoreGraphics/PDFContextTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFContextTest.cs
@@ -10,27 +10,11 @@
using System;
using System.Drawing;
using System.IO;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
@@ -50,7 +34,7 @@ namespace MonoTouchFixtures.CoreGraphics {
using (var url = new NSUrl (filename))
using (var ctx = new CGContextPDF (url)) {
ctx.BeginPage (PDFInfoTest.GetInfo ());
- ctx.SetUrl (url, RectangleF.Empty);
+ ctx.SetUrl (url, CGRect.Empty);
ctx.EndPage ();
}
}
@@ -58,7 +42,7 @@ namespace MonoTouchFixtures.CoreGraphics {
[Test]
public void Context_Url_Rect ()
{
- var rect = new RectangleF (10, 10, 100, 100);
+ var rect = new CGRect (10, 10, 100, 100);
using (var url = new NSUrl (filename))
using (var ctx = new CGContextPDF (url, rect)) {
ctx.BeginPage ((CGPDFPageInfo) null);
@@ -71,8 +55,8 @@ namespace MonoTouchFixtures.CoreGraphics {
public void Context_Url_Rect_Info ()
{
using (var url = new NSUrl (filename))
- using (var ctx = new CGContextPDF (url, new RectangleF (0, 0, 1000, 1000), PDFInfoTest.GetInfo ())) {
- ctx.AddDestination ("monkey", PointF.Empty);
+ using (var ctx = new CGContextPDF (url, new CGRect (0, 0, 1000, 1000), PDFInfoTest.GetInfo ())) {
+ ctx.AddDestination ("monkey", CGPoint.Empty);
ctx.Close ();
}
}
@@ -85,17 +69,17 @@ namespace MonoTouchFixtures.CoreGraphics {
Assert.Throws (() => new CGContextPDF ((CGDataConsumer) null), "null CGDataConsumer");
- Assert.Throws (() => new CGContextPDF ((CGDataConsumer) null, RectangleF.Empty), "null CGDataConsumer, Empty");
+ Assert.Throws (() => new CGContextPDF ((CGDataConsumer) null, CGRect.Empty), "null CGDataConsumer, Empty");
- Assert.Throws (() => new CGContextPDF ((CGDataConsumer) null, RectangleF.Empty, null), "null CGDataConsumer, Empty, null");
+ Assert.Throws (() => new CGContextPDF ((CGDataConsumer) null, CGRect.Empty, null), "null CGDataConsumer, Empty, null");
Assert.Throws (() => new CGContextPDF ((CGDataConsumer) null, null), "null CGDataConsumer, null");
Assert.Throws (() => new CGContextPDF ((NSUrl) null), "null NSUrl");
- Assert.Throws (() => new CGContextPDF ((NSUrl) null, RectangleF.Empty), "null NSUrl, Empty");
+ Assert.Throws (() => new CGContextPDF ((NSUrl) null, CGRect.Empty), "null NSUrl, Empty");
- Assert.Throws (() => new CGContextPDF ((NSUrl) null, RectangleF.Empty, null), "null NSUrl, Empty, null");
+ Assert.Throws (() => new CGContextPDF ((NSUrl) null, CGRect.Empty, null), "null NSUrl, Empty, null");
Assert.Throws (() => new CGContextPDF ((NSUrl) null, null), "null NSUrl, null");
@@ -112,7 +96,7 @@ namespace MonoTouchFixtures.CoreGraphics {
ctx.BeginTag (CGPdfTagType.Header, (NSDictionary) null);
ctx.EndTag ();
ctx.BeginTag (CGPdfTagType.Caption, d);
- ctx.SetUrl (url, RectangleF.Empty);
+ ctx.SetUrl (url, CGRect.Empty);
ctx.EndTag ();
ctx.EndPage ();
}
@@ -134,7 +118,7 @@ namespace MonoTouchFixtures.CoreGraphics {
ctx.BeginTag (CGPdfTagType.Header, tp);
ctx.EndTag ();
ctx.BeginTag (CGPdfTagType.Caption, (CGPdfTagProperties) null);
- ctx.SetUrl (url, RectangleF.Empty);
+ ctx.SetUrl (url, CGRect.Empty);
ctx.EndTag ();
ctx.EndPage ();
}
diff --git a/tests/monotouch-test/CoreGraphics/PDFDocumentTest.cs b/tests/monotouch-test/CoreGraphics/PDFDocumentTest.cs
index d76fc8aac3..86d86ae0a0 100644
--- a/tests/monotouch-test/CoreGraphics/PDFDocumentTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFDocumentTest.cs
@@ -10,25 +10,10 @@
using System;
using System.Collections.Generic;
using System.Text;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs b/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs
index 8aed19e704..d79c34efe4 100644
--- a/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFInfoTest.cs
@@ -9,7 +9,6 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -18,25 +17,9 @@ using AppKit;
using UIKit;
#endif
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
@@ -67,7 +50,7 @@ namespace MonoTouchFixtures.CoreGraphics {
Assert.Ignore ("Crash (at least on devices) with iOS 11.3 beta 1");
// Bug #8879
var info = GetInfo ();
- UIGraphics.BeginPDFContext("file", RectangleF.Empty, info);
+ UIGraphics.BeginPDFContext("file", CGRect.Empty, info);
}
[Test]
@@ -81,11 +64,11 @@ namespace MonoTouchFixtures.CoreGraphics {
info.AccessPermissions = CGPDFAccessPermissions.AllowsContentCopying;
using (var url = new NSUrl (filename)) {
- using (var ctx = new CGContextPDF (url, new RectangleF (0, 0, 1000, 1000), info)) {
+ using (var ctx = new CGContextPDF (url, new CGRect (0, 0, 1000, 1000), info)) {
Assert.IsNotNull (ctx, "1");
}
using (var consumer = new CGDataConsumer (url)) {
- using (var ctx = new CGContextPDF (consumer, new RectangleF (0, 0, 1000, 1000), info)) {
+ using (var ctx = new CGContextPDF (consumer, new CGRect (0, 0, 1000, 1000), info)) {
Assert.IsNotNull (ctx, "2");
}
}
diff --git a/tests/monotouch-test/CoreGraphics/PDFObjectTest.cs b/tests/monotouch-test/CoreGraphics/PDFObjectTest.cs
index b23c4c73c2..a10ad85e04 100644
--- a/tests/monotouch-test/CoreGraphics/PDFObjectTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFObjectTest.cs
@@ -8,20 +8,10 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if !XAMCORE_2_0
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/PDFOperatorTableTest.cs b/tests/monotouch-test/CoreGraphics/PDFOperatorTableTest.cs
index f7bfb46aa5..abb8349ed2 100644
--- a/tests/monotouch-test/CoreGraphics/PDFOperatorTableTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFOperatorTableTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreGraphics {
diff --git a/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs b/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs
index ea864ca651..0a8831ee0a 100644
--- a/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs
@@ -8,27 +8,11 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
diff --git a/tests/monotouch-test/CoreGraphics/PathTest.cs b/tests/monotouch-test/CoreGraphics/PathTest.cs
index 4a4fcc943e..56653dd7bb 100644
--- a/tests/monotouch-test/CoreGraphics/PathTest.cs
+++ b/tests/monotouch-test/CoreGraphics/PathTest.cs
@@ -10,26 +10,11 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#endif
using ObjCRuntime;
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics {
[TestFixture]
@@ -42,7 +27,7 @@ namespace MonoTouchFixtures.CoreGraphics {
[Test]
public void EllipseFromRect ()
{
- var rect = new RectangleF (0, 0, 15, 15);
+ var rect = new CGRect (0, 0, 15, 15);
var matrix = CGAffineTransform.MakeIdentity ();
using (CGPath p = CGPath.EllipseFromRect (rect, matrix)) {
Assert.IsNotNull (p, "non-null");
@@ -53,7 +38,7 @@ namespace MonoTouchFixtures.CoreGraphics {
public void CopyByDashingPath_18764 ()
{
var identity = CGAffineTransform.MakeIdentity ();
- using (var path = CGPath.EllipseFromRect (RectangleF.Empty, identity)) {
+ using (var path = CGPath.EllipseFromRect (CGRect.Empty, identity)) {
var lengths = new nfloat[] { 10, 10 };
var phase = 2;
using (var d1 = path.CopyByDashingPath (lengths)) {
@@ -139,7 +124,7 @@ namespace MonoTouchFixtures.CoreGraphics {
[Test]
public void AddRect ()
{
- var rect = new RectangleF (0, 0, 15, 15);
+ var rect = new CGRect (0, 0, 15, 15);
var matrix = CGAffineTransform.MakeIdentity ();
using (CGPath p1 = new CGPath ())
using (CGPath p2 = new CGPath ()) {
@@ -154,7 +139,7 @@ namespace MonoTouchFixtures.CoreGraphics {
[Test]
public void AddRects ()
{
- var rect = new RectangleF (0, 0, 15, 15);
+ var rect = new CGRect (0, 0, 15, 15);
var matrix = CGAffineTransform.MakeIdentity ();
using (CGPath p1 = new CGPath ())
using (CGPath p2 = new CGPath ()) {
@@ -173,8 +158,8 @@ namespace MonoTouchFixtures.CoreGraphics {
using (CGPath p1 = new CGPath ())
using (CGPath p2 = new CGPath ()) {
Assert.IsTrue (p1.IsEmpty, "IsEmpty-1");
- p1.AddLines (new [] { PointF.Empty });
- p2.AddLines (matrix, new [] { PointF.Empty });
+ p1.AddLines (new [] { CGPoint.Empty });
+ p2.AddLines (matrix, new [] { CGPoint.Empty });
Assert.IsFalse (p1.IsEmpty, "IsEmpty-2");
Assert.That (p1, Is.EqualTo (p2), "CGPathEqualToPath");
}
@@ -183,7 +168,7 @@ namespace MonoTouchFixtures.CoreGraphics {
[Test]
public void AddEllipseInRect ()
{
- var rect = new RectangleF (0, 0, 15, 15);
+ var rect = new CGRect (0, 0, 15, 15);
var matrix = CGAffineTransform.MakeIdentity ();
using (CGPath p1 = new CGPath ())
using (CGPath p2 = new CGPath ()) {
diff --git a/tests/monotouch-test/CoreGraphics/RectTest.cs b/tests/monotouch-test/CoreGraphics/RectTest.cs
index 8f4eccf30c..7cf19f2d83 100644
--- a/tests/monotouch-test/CoreGraphics/RectTest.cs
+++ b/tests/monotouch-test/CoreGraphics/RectTest.cs
@@ -8,28 +8,11 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using System.Drawing;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat = global::System.Single;
-using nint = global::System.Int32;
-using nuint = global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreGraphics
{
[TestFixture]
@@ -39,20 +22,20 @@ namespace MonoTouchFixtures.CoreGraphics
[Test]
public void Inflate ()
{
- var rect = new RectangleF (1, 2, 3, 4);
+ var rect = new CGRect (1, 2, 3, 4);
rect.Inflate (5, 6);
Assert.AreEqual (-4, (int)rect.X, "x 1");
Assert.AreEqual (-4, (int)rect.Y, "y 1");
Assert.AreEqual (13, (int)rect.Width, "w 1");
Assert.AreEqual (16, (int)rect.Height, "h 1");
- rect.Inflate (new SizeF (10, 20));
+ rect.Inflate (new CGSize (10, 20));
Assert.AreEqual (-14, (int)rect.X, "x 2");
Assert.AreEqual (-24, (int)rect.Y, "y 2");
Assert.AreEqual (33, (int)rect.Width, "w 2");
Assert.AreEqual (56, (int)rect.Height, "h 2");
- rect = RectangleF.Inflate (rect, 5, 4);
+ rect = CGRect.Inflate (rect, 5, 4);
Assert.AreEqual (-19, (int)rect.X, "x 3");
Assert.AreEqual (-28, (int)rect.Y, "y 3");
Assert.AreEqual (43, (int)rect.Width, "w 3");
diff --git a/tests/monotouch-test/CoreImage/CIKernelTests.cs b/tests/monotouch-test/CoreImage/CIKernelTests.cs
index 680a8cdb10..5ab46af8a8 100644
--- a/tests/monotouch-test/CoreImage/CIKernelTests.cs
+++ b/tests/monotouch-test/CoreImage/CIKernelTests.cs
@@ -4,7 +4,6 @@ using System;
using System.Drawing;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using CoreImage;
using CoreGraphics;
@@ -16,25 +15,8 @@ using PlatformImage = AppKit.NSImage;
using UIKit;
using PlatformImage = UIKit.UIImage;
#endif
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreImage
{
[TestFixture]
@@ -60,11 +42,7 @@ namespace MonoTouchFixtures.CoreImage
public MyCustomFilter (CustomerFilterType type)
{
Type = type;
-#if XAMCORE_2_0
kernel = CIKernel.FromProgramSingle (GetKernelString ());
-#else
- kernel = CIKernel.FromProgram (GetKernelString ());
-#endif
Assert.IsNotNull (kernel, $"Kernel: {Type}");
}
@@ -107,7 +85,7 @@ namespace MonoTouchFixtures.CoreImage
case CustomerFilterType.NoOpColorWithParam:
return new NSObject[] { MyImage, new NSNumber(5) };
case CustomerFilterType.ColorPositionKernel:
- RectangleF dod = MyImage.Extent;
+ var dod = MyImage.Extent;
double radius = 0.5 * Math.Sqrt (Math.Pow (dod.Width, 2) + Math.Pow (dod.Height, 2));
CIVector centerOffset = new CIVector ((float)(dod.Size.Width * .5), (float)(dod.Size.Height * .5));
return new NSObject[] { MyImage, centerOffset, new NSNumber (radius) };
@@ -201,11 +179,7 @@ namespace MonoTouchFixtures.CoreImage
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 11, throwIfOtherPlatform: false);
CIKernel[] kernels =
-#if XAMCORE_2_0
CIKernel.FromProgramMultiple (
-#else
- CIKernel.FromPrograms (
-#endif
NoOpColorKernel + "\n" + NoOpWithParamColorKernel + "\n" + PositionColorKernel + "\n" + NoOpWarpKernel);
Assert.AreEqual (4, kernels.Length, "CIKernel_TestFromPrograms did not get back the right number of programs");
foreach (CIKernel kernel in kernels)
diff --git a/tests/monotouch-test/CoreImage/CoreContextTest.cs b/tests/monotouch-test/CoreImage/CoreContextTest.cs
index 2044aa5743..f17ad84689 100644
--- a/tests/monotouch-test/CoreImage/CoreContextTest.cs
+++ b/tests/monotouch-test/CoreImage/CoreContextTest.cs
@@ -12,7 +12,6 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreImage;
using CoreGraphics;
@@ -25,28 +24,9 @@ using OpenGL;
using UIKit;
using OpenGLES;
#endif
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreVideo;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.OpenGLES;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreImage {
[TestFixture]
@@ -66,18 +46,18 @@ namespace MonoTouchFixtures.CoreImage {
#else
using (var ctx = CIContext.Create ()) {
#endif
- using (var v = ctx.CreateCGImage (img, new RectangleF (0, 0, 5, 5))) {
+ using (var v = ctx.CreateCGImage (img, new CGRect (0, 0, 5, 5))) {
int rc = Messaging.int_objc_msgSend (v.Handle, retainCount.Handle);
Assert.AreEqual (1, rc, "CreateCGImage #a1");
}
- using (var v = ctx.CreateCGImage (img, new RectangleF (0, 0, 32, 32), CIImage.FormatARGB8, null)) {
+ using (var v = ctx.CreateCGImage (img, new CGRect (0, 0, 32, 32), CIImage.FormatARGB8, null)) {
int rc = Messaging.int_objc_msgSend (v.Handle, retainCount.Handle);
Assert.AreEqual (1, rc, "CreateCGImage #b1");
}
#if !MONOMAC // CreateCGImage returning null on mac
- using (var v = ctx.CreateCGImage (img, new RectangleF (0, 0, 5, 5), CIFormat.ARGB8, null)) {
+ using (var v = ctx.CreateCGImage (img, new CGRect (0, 0, 5, 5), CIFormat.ARGB8, null)) {
int rc = Messaging.int_objc_msgSend (v.Handle, retainCount.Handle);
Assert.AreEqual (1, rc, "CreateCGImage #c1");
}
@@ -105,7 +85,7 @@ namespace MonoTouchFixtures.CoreImage {
using (var cv = new CVPixelBuffer (1, 1, CVPixelFormatType.CV24RGB))
using (CIImage img = new CIImage (CIColor.FromRgb (0.5f, 0.5f, 0.5f))) {
// that one "null allowed" was undocumented
- ci.Render (img, cv, RectangleF.Empty, null);
+ ci.Render (img, cv, CGRect.Empty, null);
}
}
#endif
diff --git a/tests/monotouch-test/CoreImage/CoreVectorTest.cs b/tests/monotouch-test/CoreImage/CoreVectorTest.cs
index f7696c9d5e..74a7f759d8 100644
--- a/tests/monotouch-test/CoreImage/CoreVectorTest.cs
+++ b/tests/monotouch-test/CoreImage/CoreVectorTest.cs
@@ -11,25 +11,10 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreImage;
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreImage {
[TestFixture]
diff --git a/tests/monotouch-test/CoreImage/DetectorTest.cs b/tests/monotouch-test/CoreImage/DetectorTest.cs
index 4ec46c365a..ec0dcfecd3 100644
--- a/tests/monotouch-test/CoreImage/DetectorTest.cs
+++ b/tests/monotouch-test/CoreImage/DetectorTest.cs
@@ -13,7 +13,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using CoreImage;
using CoreGraphics;
@@ -22,12 +21,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreImage {
diff --git a/tests/monotouch-test/CoreImage/FilterTest.cs b/tests/monotouch-test/CoreImage/FilterTest.cs
index 6b3a565341..89c5414818 100644
--- a/tests/monotouch-test/CoreImage/FilterTest.cs
+++ b/tests/monotouch-test/CoreImage/FilterTest.cs
@@ -13,34 +13,14 @@ using System;
using System.IO;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using AVFoundation;
using CoreGraphics;
using CoreImage;
using CoreText;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreImage;
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreImage {
[TestFixture]
diff --git a/tests/monotouch-test/CoreImage/ImageInitializationOptionsTest.cs b/tests/monotouch-test/CoreImage/ImageInitializationOptionsTest.cs
index e26c23c021..d42c1337a5 100644
--- a/tests/monotouch-test/CoreImage/ImageInitializationOptionsTest.cs
+++ b/tests/monotouch-test/CoreImage/ImageInitializationOptionsTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using CoreImage;
using Foundation;
@@ -20,12 +19,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreImage;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/CoreImage/ImageTest.cs b/tests/monotouch-test/CoreImage/ImageTest.cs
index 72e359ef29..f4cd687081 100644
--- a/tests/monotouch-test/CoreImage/ImageTest.cs
+++ b/tests/monotouch-test/CoreImage/ImageTest.cs
@@ -12,7 +12,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -22,25 +21,8 @@ using UIKit;
using CoreImage;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.CoreImage;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreImage {
[TestFixture]
diff --git a/tests/monotouch-test/CoreLocation/BeaconRegionTest.cs b/tests/monotouch-test/CoreLocation/BeaconRegionTest.cs
index 75751b8e45..ed8dcee452 100644
--- a/tests/monotouch-test/CoreLocation/BeaconRegionTest.cs
+++ b/tests/monotouch-test/CoreLocation/BeaconRegionTest.cs
@@ -10,17 +10,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using CoreLocation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreLocation {
diff --git a/tests/monotouch-test/CoreML/MLMultiArrayTest.cs b/tests/monotouch-test/CoreML/MLMultiArrayTest.cs
index 52c63a92bb..9ef25f67eb 100644
--- a/tests/monotouch-test/CoreML/MLMultiArrayTest.cs
+++ b/tests/monotouch-test/CoreML/MLMultiArrayTest.cs
@@ -7,8 +7,6 @@
// Copyright 2017 Microsoft Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using System.Runtime.InteropServices;
@@ -139,5 +137,3 @@ namespace MonoTouchFixtures.CoreML
}
}
}
-
-#endif // !XAMCORE_2_0
diff --git a/tests/monotouch-test/CoreMedia/BlockBufferTest.cs b/tests/monotouch-test/CoreMedia/BlockBufferTest.cs
index e1627a885c..ca705b6a5e 100644
--- a/tests/monotouch-test/CoreMedia/BlockBufferTest.cs
+++ b/tests/monotouch-test/CoreMedia/BlockBufferTest.cs
@@ -10,26 +10,10 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
-#else
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreMedia {
[TestFixture]
@@ -46,7 +30,6 @@ namespace MonoTouchFixtures.CoreMedia {
}
}
-#if XAMCORE_2_0
[Test]
public void CMBlockBufferCustomBlockSource ()
{
@@ -55,7 +38,6 @@ namespace MonoTouchFixtures.CoreMedia {
// it's 28 (not 32) bytes when executed on 64bits iOS, which implies it's packed to 4 bytes
Assert.That (Marshal.SizeOf (type), Is.EqualTo (4 + 3 * IntPtr.Size), "Size");
}
-#endif
[Test]
public void AppendMemoryBlockTest()
diff --git a/tests/monotouch-test/CoreMedia/CMClockOrTimebaseTest.cs b/tests/monotouch-test/CoreMedia/CMClockOrTimebaseTest.cs
index 16cf5611f7..0aa4da61da 100644
--- a/tests/monotouch-test/CoreMedia/CMClockOrTimebaseTest.cs
+++ b/tests/monotouch-test/CoreMedia/CMClockOrTimebaseTest.cs
@@ -1,12 +1,7 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia
diff --git a/tests/monotouch-test/CoreMedia/CMClockTest.cs b/tests/monotouch-test/CoreMedia/CMClockTest.cs
index 9e05cbedaf..a730e3e100 100644
--- a/tests/monotouch-test/CoreMedia/CMClockTest.cs
+++ b/tests/monotouch-test/CoreMedia/CMClockTest.cs
@@ -10,19 +10,9 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using CoreMedia;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.UIKit;
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
diff --git a/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs b/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs
index 4b9d9ffe3f..36114be0a2 100644
--- a/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs
+++ b/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs
@@ -8,7 +8,6 @@
//
using System;
using System.Collections.Generic;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
using AVFoundation;
@@ -18,13 +17,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.AVFoundation;
-using MonoTouch.UIKit;
-using nuint = global::System.UInt32;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
@@ -189,13 +181,8 @@ namespace MonoTouchFixtures.CoreMedia {
[Test]
public void VideoFormatDescriptionConstructors ()
{
-#if __UNIFIED__
using (var obj = new CMVideoFormatDescription (CMVideoCodecType.H264, new CMVideoDimensions (960, 540))) {
}
-#else
- using (var obj = new CMVideoFormatDescription (CMVideoCodecType.H264, new System.Drawing.Size (960, 540))) {
- }
-#endif
}
}
}
diff --git a/tests/monotouch-test/CoreMedia/CMMemoryPoolTest.cs b/tests/monotouch-test/CoreMedia/CMMemoryPoolTest.cs
index 088fa897de..6b3d04d36f 100644
--- a/tests/monotouch-test/CoreMedia/CMMemoryPoolTest.cs
+++ b/tests/monotouch-test/CoreMedia/CMMemoryPoolTest.cs
@@ -7,15 +7,9 @@
// Copyright 2012 Xamarin Inc All rights reserved.
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
diff --git a/tests/monotouch-test/CoreMedia/CMTimeRangeTests.cs b/tests/monotouch-test/CoreMedia/CMTimeRangeTests.cs
index 1faa8fe0d7..7eb6f6e501 100644
--- a/tests/monotouch-test/CoreMedia/CMTimeRangeTests.cs
+++ b/tests/monotouch-test/CoreMedia/CMTimeRangeTests.cs
@@ -8,14 +8,8 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
-#else
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia
diff --git a/tests/monotouch-test/CoreMedia/CMTimeTests.cs b/tests/monotouch-test/CoreMedia/CMTimeTests.cs
index 2c3e03cb59..e55a04c0c1 100644
--- a/tests/monotouch-test/CoreMedia/CMTimeTests.cs
+++ b/tests/monotouch-test/CoreMedia/CMTimeTests.cs
@@ -8,7 +8,6 @@
// Copyright 2012-2014 Xamarin Inc. All rights reserved.
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
using ObjCRuntime;
@@ -17,11 +16,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
@@ -40,9 +34,6 @@ namespace MonoTouchFixtures.CoreMedia {
Assert.That (v.TimeScale, Is.EqualTo (2), "TimeScale");
Assert.That (!v.IsInvalid, "IsInvalid");
Assert.That (v.AbsoluteValue.Description, Is.EqualTo ("{1/2 = 0.500}"), "AbsoluteValue");
-#if !XAMCORE_2_0
- Assert.That (v.AsDictionary != IntPtr.Zero, "AsDictionary");
-#endif
Assert.That (v.Description, Is.EqualTo ("{1/2 = 0.500}"), "Description");
Assert.That (!v.IsIndefinite, "IsIndefinite");
Assert.That (!v.IsNegativeInfinity, "IsNegativeInfinity");
@@ -97,7 +88,6 @@ namespace MonoTouchFixtures.CoreMedia {
// GetMinimum
Assert.That (CMTime.GetMinimum (v, y) == v, "GetMinimum #1");
-#if XAMCORE_2_0
using (var d = x.ToDictionary ()) {
Assert.That (d.RetainCount, Is.EqualTo ((nint) 1), "RetainCount");
Assert.That (d.Count, Is.EqualTo ((nuint) 4), "Count");
@@ -105,7 +95,6 @@ namespace MonoTouchFixtures.CoreMedia {
var time = CMTime.FromDictionary (d);
Assert.That (time, Is.EqualTo (x), "FromDictionary");
}
-#endif
}
[Test]
@@ -168,7 +157,7 @@ namespace MonoTouchFixtures.CoreMedia {
Assert.AreEqual (first.Start, second.Start, "CompareCMTimeRange - start - " + description);
}
-#if XAMCORE_2_0 && !__WATCHOS__
+#if !__WATCHOS__
[Test]
public void CMTimeStrongDictionary ()
{
@@ -187,6 +176,6 @@ namespace MonoTouchFixtures.CoreMedia {
set { SetCMTimeValue (TimeKey, value); }
}
}
-#endif // XAMCORE_2_0
+#endif // !__WATCHOS__
}
}
diff --git a/tests/monotouch-test/CoreMedia/CMTimebaseTest.cs b/tests/monotouch-test/CoreMedia/CMTimebaseTest.cs
index da7e8ccdd9..c924e6ea65 100644
--- a/tests/monotouch-test/CoreMedia/CMTimebaseTest.cs
+++ b/tests/monotouch-test/CoreMedia/CMTimebaseTest.cs
@@ -7,15 +7,9 @@
// Copyright 2012-2014 Xamarin Inc All rights reserved.
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
diff --git a/tests/monotouch-test/CoreMedia/EnumTest.cs b/tests/monotouch-test/CoreMedia/EnumTest.cs
index 8d24b75521..978b4a7c60 100644
--- a/tests/monotouch-test/CoreMedia/EnumTest.cs
+++ b/tests/monotouch-test/CoreMedia/EnumTest.cs
@@ -7,14 +7,8 @@
// Copyright 2014 Xamarin Inc. All rights reserved.
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMedia;
-#else
-using MonoTouch.CoreMedia;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
@@ -42,9 +36,6 @@ namespace MonoTouchFixtures.CoreMedia {
Assert.That (FourCC ((int) CMMediaType.Subtitle), Is.EqualTo ("sbtl"), "Subtitle");
Assert.That (FourCC ((int) CMMediaType.Text), Is.EqualTo ("text"), "Text");
Assert.That (FourCC ((int) CMMediaType.TimeCode), Is.EqualTo ("tmcd"), "TimeCode");
-#if !XAMCORE_2_0
- Assert.That (FourCC ((int) CMMediaType.TimedMetadata), Is.EqualTo ("tmet"), "TimedMetadata");
-#endif
Assert.That (FourCC ((int) CMMediaType.Video), Is.EqualTo ("vide"), "Video");
}
diff --git a/tests/monotouch-test/CoreMedia/SampleBufferTest.cs b/tests/monotouch-test/CoreMedia/SampleBufferTest.cs
index b79467941d..56ce8b92e6 100644
--- a/tests/monotouch-test/CoreMedia/SampleBufferTest.cs
+++ b/tests/monotouch-test/CoreMedia/SampleBufferTest.cs
@@ -7,7 +7,6 @@
// Copyright 2012 Xamarin Inc. All rights reserved.
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if !__TVOS__
using EventKit;
@@ -15,13 +14,6 @@ using EventKit;
using ObjCRuntime;
using CoreVideo;
using CoreMedia;
-#else
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.CoreVideo;
-using MonoTouch.CoreMedia;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMedia {
diff --git a/tests/monotouch-test/CoreMidi/MidiEndpointTest.cs b/tests/monotouch-test/CoreMidi/MidiEndpointTest.cs
index df4f1f8e48..aecd31e6b7 100644
--- a/tests/monotouch-test/CoreMidi/MidiEndpointTest.cs
+++ b/tests/monotouch-test/CoreMidi/MidiEndpointTest.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0 && !__TVOS__ && !__WATCHOS__
+#if !__TVOS__ && !__WATCHOS__
using System;
using Foundation;
using CoreMidi;
diff --git a/tests/monotouch-test/CoreMidi/MidiThruConnectionTests.cs b/tests/monotouch-test/CoreMidi/MidiThruConnectionTests.cs
index 5045bd4a63..d1bda40d6a 100644
--- a/tests/monotouch-test/CoreMidi/MidiThruConnectionTests.cs
+++ b/tests/monotouch-test/CoreMidi/MidiThruConnectionTests.cs
@@ -11,13 +11,8 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreMidi;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreMidi;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreMidi {
diff --git a/tests/monotouch-test/CoreMotion/AccelerometerDataTest.cs b/tests/monotouch-test/CoreMotion/AccelerometerDataTest.cs
deleted file mode 100644
index af02c74138..0000000000
--- a/tests/monotouch-test/CoreMotion/AccelerometerDataTest.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// Unit tests for CMAccelerometerData
-//
-// Authors:
-// Sebastien Pouliot
-//
-// Copyright 2012 Xamarin Inc. All rights reserved.
-//
-
-#if !__TVOS__ && !MONOMAC
-
-using System;
-#if XAMCORE_2_0
-using Foundation;
-using CoreMotion;
-using ObjCRuntime;
-#else
-using MonoTouch.CoreMotion;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
-using NUnit.Framework;
-
-namespace MonoTouchFixtures.CoreMotion {
-
- [TestFixture]
- [Preserve (AllMembers = true)]
- public class AccelerometerDataTest {
-
-#if !XAMCORE_2_0 // the default ctor has been removed.
- [Test]
- public void Default ()
- {
- // this would (and did) crash if we called 'init'
- using (var ad = new CMAccelerometerData ()) {
- Assert.That (ad.Acceleration.X, Is.EqualTo (0.0d), "X");
- Assert.That (ad.Acceleration.Y, Is.EqualTo (0.0d), "Y");
- Assert.That (ad.Acceleration.Z, Is.EqualTo (0.0d), "Z");
- // from CMLogItem
- // NaN on the simulator, 0.0d on devices - but we just want to ensure we do not crash
- Assert.That (ad.Timestamp, Is.Not.EqualTo (1.0d), "Timestamp");
- }
- }
-#endif
- }
-}
-
-#endif // !__TVOS__
diff --git a/tests/monotouch-test/CoreMotion/LogItemTest.cs b/tests/monotouch-test/CoreMotion/LogItemTest.cs
deleted file mode 100644
index 04fc0cee7d..0000000000
--- a/tests/monotouch-test/CoreMotion/LogItemTest.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// Unit tests for CMLogItem
-//
-// Authors:
-// Sebastien Pouliot
-//
-// Copyright 2012 Xamarin Inc. All rights reserved.
-//
-
-#if !__TVOS__ && !MONOMAC
-
-using System;
-#if XAMCORE_2_0
-using ObjCRuntime;
-using Foundation;
-using CoreMotion;
-#else
-using MonoTouch.CoreMotion;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
-using NUnit.Framework;
-
-namespace MonoTouchFixtures.CoreMotion {
-
- [TestFixture]
- [Preserve (AllMembers = true)]
- public class LogItemTest {
-
-#if !XAMCORE_2_0 // the default ctor has been removed.
- [Test]
- public void Default ()
- {
- // this would (and did) crash if we called 'init'
- using (var li = new CMLogItem ()) {
- // NaN on the simulator, 0.0d on devices - but we just want to ensure we do not crash
- Assert.That (li.Timestamp, Is.Not.EqualTo (1.0d), "Timestamp");
- }
- }
-#endif
- }
-}
-
-#endif // !__TVOS__
diff --git a/tests/monotouch-test/CoreServices/HttpMessageTest.cs b/tests/monotouch-test/CoreServices/HttpMessageTest.cs
index d4601bc82d..2e0df41f6c 100644
--- a/tests/monotouch-test/CoreServices/HttpMessageTest.cs
+++ b/tests/monotouch-test/CoreServices/HttpMessageTest.cs
@@ -13,17 +13,11 @@ using System;
using System.Net;
#if XAMCORE_4_0
using CFNetwork;
-#elif XAMCORE_2_0
+#else
using CoreServices;
#endif
-#if XAMCORE_2_0
using Foundation;
using CoreFoundation;
-#else
-using MonoTouch.CoreServices;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
using System.Threading;
diff --git a/tests/monotouch-test/CoreText/CTFontCollectionTest.cs b/tests/monotouch-test/CoreText/CTFontCollectionTest.cs
index f21d55a1cd..ccef2709b7 100644
--- a/tests/monotouch-test/CoreText/CTFontCollectionTest.cs
+++ b/tests/monotouch-test/CoreText/CTFontCollectionTest.cs
@@ -9,14 +9,9 @@
using System;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using CoreText;
using ObjCRuntime;
-#else
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreText {
diff --git a/tests/monotouch-test/CoreText/CTFrameTests.cs b/tests/monotouch-test/CoreText/CTFrameTests.cs
index cec4d9ce38..6cf339fc8e 100644
--- a/tests/monotouch-test/CoreText/CTFrameTests.cs
+++ b/tests/monotouch-test/CoreText/CTFrameTests.cs
@@ -8,16 +8,10 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreText;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreText {
diff --git a/tests/monotouch-test/CoreText/CTLineTest.cs b/tests/monotouch-test/CoreText/CTLineTest.cs
index 6b5ed54f06..396da2a335 100644
--- a/tests/monotouch-test/CoreText/CTLineTest.cs
+++ b/tests/monotouch-test/CoreText/CTLineTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -19,25 +18,9 @@ using UIKit;
#endif
using CoreGraphics;
using CoreText;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Drawing;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreText
{
[TestFixture]
@@ -61,11 +44,7 @@ namespace MonoTouchFixtures.CoreText
var line = new CTLine (attributedString);
bool executed = false;
-#if XAMCORE_2_0
line.EnumerateCaretOffsets ((double o, nint charIndex, bool leadingEdge, ref bool stop) => {
-#else
- line.EnumerateCaretOffsets ((double o, int charIndex, bool leadingEdge, ref bool stop) => {
-#endif
executed = true;
});
Assert.IsTrue (executed);
diff --git a/tests/monotouch-test/CoreText/CTParagraphStyleTests.cs b/tests/monotouch-test/CoreText/CTParagraphStyleTests.cs
index 01b9ee17ff..2d7d37f910 100644
--- a/tests/monotouch-test/CoreText/CTParagraphStyleTests.cs
+++ b/tests/monotouch-test/CoreText/CTParagraphStyleTests.cs
@@ -11,24 +11,8 @@ using System;
using NUnit.Framework;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using CoreText;
-#else
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-#endif
-
-
-#if XAMCORE_2_0
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
-#else
-using nfloat = global::System.Single;
-using nint = global::System.Int32;
-using nuint = global::System.UInt32;
-#endif
namespace MonoTouchFixtures.CoreText {
diff --git a/tests/monotouch-test/CoreText/FontDescriptorTest.cs b/tests/monotouch-test/CoreText/FontDescriptorTest.cs
index 31f3c0b31e..81d0ca0b58 100644
--- a/tests/monotouch-test/CoreText/FontDescriptorTest.cs
+++ b/tests/monotouch-test/CoreText/FontDescriptorTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreText;
#if MONOMAC
@@ -16,24 +15,9 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Linq;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreText {
[TestFixture]
diff --git a/tests/monotouch-test/CoreText/FontManagerTest.cs b/tests/monotouch-test/CoreText/FontManagerTest.cs
index 81dd79a9bd..5bd02b7fbb 100644
--- a/tests/monotouch-test/CoreText/FontManagerTest.cs
+++ b/tests/monotouch-test/CoreText/FontManagerTest.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using CoreText;
#if MONOMAC
@@ -17,24 +16,9 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Linq;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreText {
[TestFixture]
diff --git a/tests/monotouch-test/CoreText/FontTest.cs b/tests/monotouch-test/CoreText/FontTest.cs
index bc08064039..a9b8e801c0 100644
--- a/tests/monotouch-test/CoreText/FontTest.cs
+++ b/tests/monotouch-test/CoreText/FontTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using CoreText;
using Foundation;
@@ -17,24 +16,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreText {
[TestFixture]
diff --git a/tests/monotouch-test/CoreText/StringAttributes.cs b/tests/monotouch-test/CoreText/StringAttributes.cs
index c063b26f25..7e12ecc4b6 100644
--- a/tests/monotouch-test/CoreText/StringAttributes.cs
+++ b/tests/monotouch-test/CoreText/StringAttributes.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -18,25 +17,9 @@ using UIKit;
#endif
using CoreGraphics;
using CoreText;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreText;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Drawing;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreText
{
[TestFixture]
@@ -65,7 +48,7 @@ namespace MonoTouchFixtures.CoreText
if (TestRuntime.CheckXcodeVersion (11, 0))
sa.TrackingAdjustment = 1.0f;
- var size = new SizeF (300, 300);
+ var size = new CGSize (300, 300);
UIGraphics.BeginImageContext (size);
var gctx = UIGraphics.GetCurrentContext ();
diff --git a/tests/monotouch-test/CoreVideo/CVImageBufferTests.cs b/tests/monotouch-test/CoreVideo/CVImageBufferTests.cs
index 0441dc73f4..e5a52139f0 100644
--- a/tests/monotouch-test/CoreVideo/CVImageBufferTests.cs
+++ b/tests/monotouch-test/CoreVideo/CVImageBufferTests.cs
@@ -7,8 +7,6 @@
// Copyright 2017 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using Foundation;
using NUnit.Framework;
@@ -97,4 +95,3 @@ namespace MonoTouchFixtures.CoreVideo {
}
}
}
-#endif
diff --git a/tests/monotouch-test/CoreVideo/CVMetalTextureCacheTests.cs b/tests/monotouch-test/CoreVideo/CVMetalTextureCacheTests.cs
index f081e2e7f5..6f64ce996f 100644
--- a/tests/monotouch-test/CoreVideo/CVMetalTextureCacheTests.cs
+++ b/tests/monotouch-test/CoreVideo/CVMetalTextureCacheTests.cs
@@ -7,7 +7,7 @@
// Copyright 2017 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0 && !__WATCHOS__ && !MONOMAC
+#if !__WATCHOS__ && !MONOMAC
using System;
using Foundation;
diff --git a/tests/monotouch-test/CoreVideo/CoreVideoEnumsTest.cs b/tests/monotouch-test/CoreVideo/CoreVideoEnumsTest.cs
index 93a4645623..4628bff683 100644
--- a/tests/monotouch-test/CoreVideo/CoreVideoEnumsTest.cs
+++ b/tests/monotouch-test/CoreVideo/CoreVideoEnumsTest.cs
@@ -10,14 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreVideo;
using Foundation;
-#else
-using MonoTouch.CoreVideo;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreVideo {
diff --git a/tests/monotouch-test/CoreVideo/PixelBufferAttributesTest.cs b/tests/monotouch-test/CoreVideo/PixelBufferAttributesTest.cs
index 0dfadbbf28..b6750d94ba 100644
--- a/tests/monotouch-test/CoreVideo/PixelBufferAttributesTest.cs
+++ b/tests/monotouch-test/CoreVideo/PixelBufferAttributesTest.cs
@@ -9,29 +9,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using CoreVideo;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.CoreVideo;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreVideo {
[TestFixture]
diff --git a/tests/monotouch-test/CoreVideo/PixelBufferPoolTest.cs b/tests/monotouch-test/CoreVideo/PixelBufferPoolTest.cs
index a1ca3f8928..c2986aec28 100644
--- a/tests/monotouch-test/CoreVideo/PixelBufferPoolTest.cs
+++ b/tests/monotouch-test/CoreVideo/PixelBufferPoolTest.cs
@@ -11,15 +11,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using CoreVideo;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.CoreVideo;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreVideo {
diff --git a/tests/monotouch-test/CoreVideo/PixelBufferTest.cs b/tests/monotouch-test/CoreVideo/PixelBufferTest.cs
index 3eefdc98c6..9a20611190 100644
--- a/tests/monotouch-test/CoreVideo/PixelBufferTest.cs
+++ b/tests/monotouch-test/CoreVideo/PixelBufferTest.cs
@@ -12,17 +12,10 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using CoreVideo;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.CoreVideo;
-using nint = System.Int32;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreVideo {
diff --git a/tests/monotouch-test/CoreVideo/PixelFormatDescriptionTest.cs b/tests/monotouch-test/CoreVideo/PixelFormatDescriptionTest.cs
index bdea098749..448baf25fb 100644
--- a/tests/monotouch-test/CoreVideo/PixelFormatDescriptionTest.cs
+++ b/tests/monotouch-test/CoreVideo/PixelFormatDescriptionTest.cs
@@ -10,27 +10,11 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreVideo;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.CoreVideo;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.CoreVideo {
[TestFixture]
diff --git a/tests/monotouch-test/EventKit/AlarmTest.cs b/tests/monotouch-test/EventKit/AlarmTest.cs
index 538beec040..8070826fee 100644
--- a/tests/monotouch-test/EventKit/AlarmTest.cs
+++ b/tests/monotouch-test/EventKit/AlarmTest.cs
@@ -10,18 +10,10 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using EventKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.EventKit {
diff --git a/tests/monotouch-test/EventKit/CalendarTest.cs b/tests/monotouch-test/EventKit/CalendarTest.cs
index 12ceb7ebfc..72051eab96 100644
--- a/tests/monotouch-test/EventKit/CalendarTest.cs
+++ b/tests/monotouch-test/EventKit/CalendarTest.cs
@@ -11,18 +11,10 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
using EventKit;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.EventKit {
diff --git a/tests/monotouch-test/EventKit/EKUIBundleTest.cs b/tests/monotouch-test/EventKit/EKUIBundleTest.cs
index ebd0f47853..43a54b5a95 100644
--- a/tests/monotouch-test/EventKit/EKUIBundleTest.cs
+++ b/tests/monotouch-test/EventKit/EKUIBundleTest.cs
@@ -7,7 +7,7 @@
// Copyright 2017 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0 && !__TVOS__ && !__WATCHOS__ && !MONOMAC
+#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
using EventKitUI;
diff --git a/tests/monotouch-test/EventKit/EventStoreTest.cs b/tests/monotouch-test/EventKit/EventStoreTest.cs
index 90c16104c3..e143819d93 100644
--- a/tests/monotouch-test/EventKit/EventStoreTest.cs
+++ b/tests/monotouch-test/EventKit/EventStoreTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using EventKit;
-#else
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using System.Threading;
using System.Linq;
diff --git a/tests/monotouch-test/EventKit/RecurrenceRule.cs b/tests/monotouch-test/EventKit/RecurrenceRule.cs
index bf54a04a0d..90130cc1f7 100644
--- a/tests/monotouch-test/EventKit/RecurrenceRule.cs
+++ b/tests/monotouch-test/EventKit/RecurrenceRule.cs
@@ -10,15 +10,9 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using EventKit;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.EventKit {
diff --git a/tests/monotouch-test/EventKit/ReminderTest.cs b/tests/monotouch-test/EventKit/ReminderTest.cs
index df3651af63..f8745906a8 100644
--- a/tests/monotouch-test/EventKit/ReminderTest.cs
+++ b/tests/monotouch-test/EventKit/ReminderTest.cs
@@ -10,27 +10,11 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using EventKit;
using ObjCRuntime;
-#else
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.EventKit {
[Ignore ("default EKReminder constructor fails in xcode 11 beta 3 - https://github.com/xamarin/maccore/issues/1832")]
diff --git a/tests/monotouch-test/EventKit/StructuredLocationTest.cs b/tests/monotouch-test/EventKit/StructuredLocationTest.cs
index f7a150afde..60d9c4570e 100644
--- a/tests/monotouch-test/EventKit/StructuredLocationTest.cs
+++ b/tests/monotouch-test/EventKit/StructuredLocationTest.cs
@@ -10,16 +10,9 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using EventKit;
using ObjCRuntime;
-#else
-using MonoTouch.EventKit;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.EventKit {
diff --git a/tests/monotouch-test/ExternalAccessory/AccessoryManagerTest.cs b/tests/monotouch-test/ExternalAccessory/AccessoryManagerTest.cs
index ec7e74053d..6698085111 100644
--- a/tests/monotouch-test/ExternalAccessory/AccessoryManagerTest.cs
+++ b/tests/monotouch-test/ExternalAccessory/AccessoryManagerTest.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using ExternalAccessory;
-#else
-using MonoTouch.ExternalAccessory;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ExternalAccessory {
diff --git a/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs b/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs
index 7e0af25804..c554651f6e 100644
--- a/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs
+++ b/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs
@@ -8,7 +8,7 @@
// Copyright 2017 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using FileProvider;
diff --git a/tests/monotouch-test/Foundation/ArrayTest.cs b/tests/monotouch-test/Foundation/ArrayTest.cs
index 8e2a4068d4..026b849ce6 100644
--- a/tests/monotouch-test/Foundation/ArrayTest.cs
+++ b/tests/monotouch-test/Foundation/ArrayTest.cs
@@ -8,27 +8,11 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
@@ -59,21 +43,10 @@ namespace MonoTouchFixtures.Foundation {
// the new NSObject are often, but not always, in ascending order
// (because of how we allocate them) so we sort the other way
-#if XAMCORE_2_0
- NSComparisonResult
-#else
- int
-#endif
- Comparator (NSObject obj1, NSObject obj2)
+ NSComparisonResult Comparator (NSObject obj1, NSObject obj2)
{
comparator_count++;
- return
-#if XAMCORE_2_0
- (NSComparisonResult) (long)
-#else
- (int)
-#endif
- ((nint) obj2.Handle - (nint) obj1.Handle);
+ return (NSComparisonResult) (long) ((nint) obj2.Handle - (nint) obj1.Handle);
}
[Test]
diff --git a/tests/monotouch-test/Foundation/AttributedStringTest.cs b/tests/monotouch-test/Foundation/AttributedStringTest.cs
index 4b99936160..c823465a67 100644
--- a/tests/monotouch-test/Foundation/AttributedStringTest.cs
+++ b/tests/monotouch-test/Foundation/AttributedStringTest.cs
@@ -1,6 +1,5 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -13,24 +12,6 @@ using ObjCRuntime;
#if !__WATCHOS__
using CoreText;
#endif
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouch.CoreText;
-#endif
-
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/BlockOperationTest.cs b/tests/monotouch-test/Foundation/BlockOperationTest.cs
index 6acd6acc8a..b80f61ed00 100644
--- a/tests/monotouch-test/Foundation/BlockOperationTest.cs
+++ b/tests/monotouch-test/Foundation/BlockOperationTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/BundleTest.cs b/tests/monotouch-test/Foundation/BundleTest.cs
index 4920e07290..0977ca7fab 100644
--- a/tests/monotouch-test/Foundation/BundleTest.cs
+++ b/tests/monotouch-test/Foundation/BundleTest.cs
@@ -9,7 +9,6 @@
using System;
using System.Net;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -17,11 +16,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/CachedUrlResponseTest.cs b/tests/monotouch-test/Foundation/CachedUrlResponseTest.cs
index 4159335472..e2399de356 100644
--- a/tests/monotouch-test/Foundation/CachedUrlResponseTest.cs
+++ b/tests/monotouch-test/Foundation/CachedUrlResponseTest.cs
@@ -1,11 +1,6 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/CalendarTest.cs b/tests/monotouch-test/Foundation/CalendarTest.cs
index d6c1802fa5..adff83e6a2 100644
--- a/tests/monotouch-test/Foundation/CalendarTest.cs
+++ b/tests/monotouch-test/Foundation/CalendarTest.cs
@@ -1,22 +1,11 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
using RectangleF=CoreGraphics.CGRect;
using SizeF=CoreGraphics.CGSize;
using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
#if MONOMAC
using PlatformException = Foundation.ObjCException;
diff --git a/tests/monotouch-test/Foundation/CoderTest.cs b/tests/monotouch-test/Foundation/CoderTest.cs
index 23eed63f1a..549c6d6b09 100644
--- a/tests/monotouch-test/Foundation/CoderTest.cs
+++ b/tests/monotouch-test/Foundation/CoderTest.cs
@@ -11,13 +11,8 @@ using System;
using System.IO;
using System.Net;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
@@ -46,9 +41,7 @@ namespace MonoTouchFixtures.Foundation {
coder.Encode (true, "bool");
coder.Encode (long.MaxValue, "long");
coder.Encode (buffer, 2, 1, "buffer2");
-#if XAMCORE_2_0
coder.Encode (nint.MaxValue, "nint");
-#endif
coder.EncodeBlock (ptr, buffer.Length, "block");
coder.FinishEncoding ();
}
@@ -67,9 +60,7 @@ namespace MonoTouchFixtures.Foundation {
Assert.AreEqual (buf.Length, buffer.Length, "buffer2.length");
for (int i = 0; i < buf.Length; i++)
Assert.AreEqual (buf [i], buffer [i], "buffer2 [" + i.ToString () + "]");
-#if XAMCORE_2_0
Assert.AreEqual (nint.MaxValue, decoder.DecodeNInt ("nint"));
-#endif
buf = decoder.DecodeBytes ("block");
Assert.AreEqual (buf.Length, buffer.Length, "block.length");
diff --git a/tests/monotouch-test/Foundation/CookieTest.cs b/tests/monotouch-test/Foundation/CookieTest.cs
index d5b94444af..b895f1235a 100644
--- a/tests/monotouch-test/Foundation/CookieTest.cs
+++ b/tests/monotouch-test/Foundation/CookieTest.cs
@@ -9,25 +9,10 @@
using System;
using System.Net;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
@@ -39,11 +24,7 @@ namespace MonoTouchFixtures.Foundation {
public void NSDictionaryCtor ()
{
using (var props = new NSMutableDictionary ()) {
-#if XAMCORE_2_0
props.Add (NSHttpCookie.KeyOriginUrl, new NSString ("http://yodawg.com"));
-#else
- props.Add (NSHttpCookie.KeyOriginURL, new NSString ("http://yodawg.com"));
-#endif
props.Add (NSHttpCookie.KeyName, new NSString ("iherd"));
props.Add (NSHttpCookie.KeyValue, new NSString ("ulikecookies"));
@@ -67,11 +48,7 @@ namespace MonoTouchFixtures.Foundation {
public void CookieFromProperties ()
{
using (var props = new NSMutableDictionary ()) {
-#if XAMCORE_2_0
props.Add (NSHttpCookie.KeyOriginUrl, new NSString ("http://yodawg.com"));
-#else
- props.Add (NSHttpCookie.KeyOriginURL, new NSString ("http://yodawg.com"));
-#endif
props.Add (NSHttpCookie.KeyName, new NSString ("iherd"));
props.Add (NSHttpCookie.KeyValue, new NSString ("ulikecookies"));
diff --git a/tests/monotouch-test/Foundation/DateFormatterTest.cs b/tests/monotouch-test/Foundation/DateFormatterTest.cs
index df3088337e..2028dcbdd2 100644
--- a/tests/monotouch-test/Foundation/DateFormatterTest.cs
+++ b/tests/monotouch-test/Foundation/DateFormatterTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Net;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/DateTest.cs b/tests/monotouch-test/Foundation/DateTest.cs
index 562fbc3c58..b800dc45e1 100644
--- a/tests/monotouch-test/Foundation/DateTest.cs
+++ b/tests/monotouch-test/Foundation/DateTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Net;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
@@ -41,7 +36,6 @@ namespace MonoTouchFixtures.Foundation {
[Test]
public void OutLimits ()
{
-#if XAMCORE_2_0
Assert.Throws (() => { var tmp = (DateTime) NSDate.DistantPast; }, "distant past");
Assert.Throws (() => { var tmp = (DateTime) NSDate.FromTimeIntervalSinceReferenceDate (-63113904001); }, "-63113904001");
@@ -50,15 +44,6 @@ namespace MonoTouchFixtures.Foundation {
// [Min|Max]Value are DateTimeKind.Unspecified
Assert.Throws (() => { var tmp = (NSDate) DateTime.MinValue; }, "MinValue");
Assert.Throws (() => { var tmp = (NSDate) DateTime.MaxValue; }, "MaxValue");
-#else
- Assert.AreEqual (DateTime.MinValue, (DateTime)NSDate.DistantPast, "distant past");
- Assert.AreEqual (DateTime.MinValue, (DateTime)NSDate.FromTimeIntervalSinceReferenceDate (-63113904001), "-63113904001");
-
- Assert.AreEqual (DateTime.MaxValue, (DateTime)NSDate.FromTimeIntervalSinceReferenceDate (252423993600), "252423993600");
-
- Assert.DoesNotThrow (() => { var tmp = (NSDate) DateTime.MinValue; }, "MinValue");
- Assert.DoesNotThrow (() => { var tmp = (NSDate) DateTime.MaxValue; }, "MaxValue");
-#endif
}
[Test]
diff --git a/tests/monotouch-test/Foundation/DecimalNumberTest.cs b/tests/monotouch-test/Foundation/DecimalNumberTest.cs
index c4a6fff514..4c0f84c758 100644
--- a/tests/monotouch-test/Foundation/DecimalNumberTest.cs
+++ b/tests/monotouch-test/Foundation/DecimalNumberTest.cs
@@ -8,11 +8,7 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/DecimalTest.cs b/tests/monotouch-test/Foundation/DecimalTest.cs
index f871c269e2..471fd68d8d 100644
--- a/tests/monotouch-test/Foundation/DecimalTest.cs
+++ b/tests/monotouch-test/Foundation/DecimalTest.cs
@@ -9,11 +9,7 @@
using System;
using System.Globalization;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/DictionaryContainerTest.cs b/tests/monotouch-test/Foundation/DictionaryContainerTest.cs
index dd940797e1..52848b3c16 100644
--- a/tests/monotouch-test/Foundation/DictionaryContainerTest.cs
+++ b/tests/monotouch-test/Foundation/DictionaryContainerTest.cs
@@ -8,15 +8,9 @@
//
using System;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
@@ -63,7 +57,6 @@ namespace MonoTouchFixtures.Foundation {
SetNumberValue (key, value);
}
-#if XAMCORE_2_0
public void SetNumberValue_ (NSString key, nint? value)
{
SetNumberValue (key, value);
@@ -73,7 +66,6 @@ namespace MonoTouchFixtures.Foundation {
{
SetNumberValue (key, value);
}
-#endif
public void SetStringValue_ (NSString key, string value)
{
diff --git a/tests/monotouch-test/Foundation/DimensionTest.cs b/tests/monotouch-test/Foundation/DimensionTest.cs
index 94200da0db..0236f687c0 100644
--- a/tests/monotouch-test/Foundation/DimensionTest.cs
+++ b/tests/monotouch-test/Foundation/DimensionTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -16,11 +15,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/EncodingDetectionOptionsTest.cs b/tests/monotouch-test/Foundation/EncodingDetectionOptionsTest.cs
index 5f22eebb6d..95df5162e2 100644
--- a/tests/monotouch-test/Foundation/EncodingDetectionOptionsTest.cs
+++ b/tests/monotouch-test/Foundation/EncodingDetectionOptionsTest.cs
@@ -8,12 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/FileCoordinatorTest.cs b/tests/monotouch-test/Foundation/FileCoordinatorTest.cs
index ab1526c43c..9be313fd90 100644
--- a/tests/monotouch-test/Foundation/FileCoordinatorTest.cs
+++ b/tests/monotouch-test/Foundation/FileCoordinatorTest.cs
@@ -9,13 +9,8 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/FileHandleTest.cs b/tests/monotouch-test/Foundation/FileHandleTest.cs
index 53fe3e7451..4b8bfb14ee 100644
--- a/tests/monotouch-test/Foundation/FileHandleTest.cs
+++ b/tests/monotouch-test/Foundation/FileHandleTest.cs
@@ -8,11 +8,7 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/FileManagerTest.cs b/tests/monotouch-test/Foundation/FileManagerTest.cs
index daa497e1f6..7c11319364 100644
--- a/tests/monotouch-test/Foundation/FileManagerTest.cs
+++ b/tests/monotouch-test/Foundation/FileManagerTest.cs
@@ -10,7 +10,6 @@
using System;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -18,11 +17,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/FormatterTests.cs b/tests/monotouch-test/Foundation/FormatterTests.cs
index 4de3d2cbc8..d929a2fb26 100644
--- a/tests/monotouch-test/Foundation/FormatterTests.cs
+++ b/tests/monotouch-test/Foundation/FormatterTests.cs
@@ -1,5 +1,4 @@
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -7,22 +6,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation
{
[TestFixture]
diff --git a/tests/monotouch-test/Foundation/IndexPathTest.cs b/tests/monotouch-test/Foundation/IndexPathTest.cs
index e587d74497..170b71abaa 100644
--- a/tests/monotouch-test/Foundation/IndexPathTest.cs
+++ b/tests/monotouch-test/Foundation/IndexPathTest.cs
@@ -8,23 +8,9 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
diff --git a/tests/monotouch-test/Foundation/KeyedUnarchiverTest.cs b/tests/monotouch-test/Foundation/KeyedUnarchiverTest.cs
index 67eb1fcd6f..2825b868d8 100644
--- a/tests/monotouch-test/Foundation/KeyedUnarchiverTest.cs
+++ b/tests/monotouch-test/Foundation/KeyedUnarchiverTest.cs
@@ -11,7 +11,6 @@ using System;
using System.Net;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -21,12 +20,6 @@ using PlatformException=Foundation.ObjCException;
using UIKit;
using PlatformException=Foundation.MonoTouchException;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using PlatformException=MonoTouch.Foundation.MonoTouchException;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Foundation/LocaleTest.cs b/tests/monotouch-test/Foundation/LocaleTest.cs
index ff783fc17e..b3a11a3798 100644
--- a/tests/monotouch-test/Foundation/LocaleTest.cs
+++ b/tests/monotouch-test/Foundation/LocaleTest.cs
@@ -9,17 +9,12 @@
using System;
using System.Globalization;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/MutableAttributedStringTest.cs b/tests/monotouch-test/Foundation/MutableAttributedStringTest.cs
index bb4318e436..49cba207f8 100644
--- a/tests/monotouch-test/Foundation/MutableAttributedStringTest.cs
+++ b/tests/monotouch-test/Foundation/MutableAttributedStringTest.cs
@@ -8,11 +8,7 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/MutableDataTest.cs b/tests/monotouch-test/Foundation/MutableDataTest.cs
index 139ad0404a..df54db1954 100644
--- a/tests/monotouch-test/Foundation/MutableDataTest.cs
+++ b/tests/monotouch-test/Foundation/MutableDataTest.cs
@@ -8,29 +8,14 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
diff --git a/tests/monotouch-test/Foundation/MutableStringTest.cs b/tests/monotouch-test/Foundation/MutableStringTest.cs
index 1954decbb8..1b0b33b3d4 100644
--- a/tests/monotouch-test/Foundation/MutableStringTest.cs
+++ b/tests/monotouch-test/Foundation/MutableStringTest.cs
@@ -9,29 +9,14 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
@@ -63,11 +48,7 @@ namespace MonoTouchFixtures.Foundation {
var number = s.ReplaceOcurrences ((NSString)"World", (NSString)"Xamarin",
NSStringCompareOptions.CaseInsensitiveSearch, new NSRange (0, s.Length));
-#if XAMCORE_2_0
Assert.That (number, Is.EqualTo ((nuint) 1), "Number of replacements");
-#else
- Assert.That (number, Is.EqualTo (1), "Number of replacements");
-#endif
Assert.That (s.ToString (), Is.EqualTo ("Hello Xamarin"), "replaced");
Assert.Throws (delegate {
diff --git a/tests/monotouch-test/Foundation/NSArray1Test.cs b/tests/monotouch-test/Foundation/NSArray1Test.cs
index d770328160..b0c378f548 100644
--- a/tests/monotouch-test/Foundation/NSArray1Test.cs
+++ b/tests/monotouch-test/Foundation/NSArray1Test.cs
@@ -8,8 +8,6 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -96,4 +94,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-#endif // XAMCORE_2_0
\ No newline at end of file
diff --git a/tests/monotouch-test/Foundation/NSCharacterSetTest.cs b/tests/monotouch-test/Foundation/NSCharacterSetTest.cs
index 1fcef19749..2e25ffd9d1 100644
--- a/tests/monotouch-test/Foundation/NSCharacterSetTest.cs
+++ b/tests/monotouch-test/Foundation/NSCharacterSetTest.cs
@@ -1,28 +1,13 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation
{
[TestFixture]
diff --git a/tests/monotouch-test/Foundation/NSDataTest.cs b/tests/monotouch-test/Foundation/NSDataTest.cs
index 87f6ab7224..9d337320f0 100644
--- a/tests/monotouch-test/Foundation/NSDataTest.cs
+++ b/tests/monotouch-test/Foundation/NSDataTest.cs
@@ -11,7 +11,6 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -19,21 +18,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using MonoTests.System.Net.Http;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSDateComponentsTest.cs b/tests/monotouch-test/Foundation/NSDateComponentsTest.cs
index 2ccac41c5b..6a370be7fd 100644
--- a/tests/monotouch-test/Foundation/NSDateComponentsTest.cs
+++ b/tests/monotouch-test/Foundation/NSDateComponentsTest.cs
@@ -1,10 +1,5 @@
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSDictionary2Test.cs b/tests/monotouch-test/Foundation/NSDictionary2Test.cs
index 81221df055..00f6aac4fa 100644
--- a/tests/monotouch-test/Foundation/NSDictionary2Test.cs
+++ b/tests/monotouch-test/Foundation/NSDictionary2Test.cs
@@ -1,6 +1,3 @@
-
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -580,5 +577,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
diff --git a/tests/monotouch-test/Foundation/NSDictionaryTest.cs b/tests/monotouch-test/Foundation/NSDictionaryTest.cs
index c11e571880..e703b9f062 100644
--- a/tests/monotouch-test/Foundation/NSDictionaryTest.cs
+++ b/tests/monotouch-test/Foundation/NSDictionaryTest.cs
@@ -3,23 +3,8 @@ using System.Runtime.InteropServices;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
-
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSExpressionTest.cs b/tests/monotouch-test/Foundation/NSExpressionTest.cs
index 8a33f3b747..0a6bf33cb0 100644
--- a/tests/monotouch-test/Foundation/NSExpressionTest.cs
+++ b/tests/monotouch-test/Foundation/NSExpressionTest.cs
@@ -2,12 +2,8 @@ using System;
using System.Collections.Generic;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
[assembly: Preserve (typeof (NSExpression), AllMembers = true)]
diff --git a/tests/monotouch-test/Foundation/NSInputStreamTest.cs b/tests/monotouch-test/Foundation/NSInputStreamTest.cs
index 40878cd51b..40c1b7a9fb 100644
--- a/tests/monotouch-test/Foundation/NSInputStreamTest.cs
+++ b/tests/monotouch-test/Foundation/NSInputStreamTest.cs
@@ -1,10 +1,6 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSLayoutConstraintTest.cs b/tests/monotouch-test/Foundation/NSLayoutConstraintTest.cs
index 74a26183c1..225181c5a2 100644
--- a/tests/monotouch-test/Foundation/NSLayoutConstraintTest.cs
+++ b/tests/monotouch-test/Foundation/NSLayoutConstraintTest.cs
@@ -7,12 +7,8 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
//
#if !MONOMAC
-#if XAMCORE_2_0
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSLinguisticAnalysisTest.cs b/tests/monotouch-test/Foundation/NSLinguisticAnalysisTest.cs
index 87e64f75d2..472eb123b8 100644
--- a/tests/monotouch-test/Foundation/NSLinguisticAnalysisTest.cs
+++ b/tests/monotouch-test/Foundation/NSLinguisticAnalysisTest.cs
@@ -1,14 +1,8 @@
using System;
using System.Collections.Generic;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
namespace monotouchtest
diff --git a/tests/monotouch-test/Foundation/NSLocaleTest.cs b/tests/monotouch-test/Foundation/NSLocaleTest.cs
index 7810aa8dc4..ff7cf71bad 100644
--- a/tests/monotouch-test/Foundation/NSLocaleTest.cs
+++ b/tests/monotouch-test/Foundation/NSLocaleTest.cs
@@ -3,13 +3,8 @@ using System.Collections.ObjectModel;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSMutableArray1Test.cs b/tests/monotouch-test/Foundation/NSMutableArray1Test.cs
index 1a995408bf..4170eb49b1 100644
--- a/tests/monotouch-test/Foundation/NSMutableArray1Test.cs
+++ b/tests/monotouch-test/Foundation/NSMutableArray1Test.cs
@@ -1,6 +1,3 @@
-
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -237,5 +234,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
diff --git a/tests/monotouch-test/Foundation/NSMutableDictionary2Test.cs b/tests/monotouch-test/Foundation/NSMutableDictionary2Test.cs
index d6c237dbdc..f0b5b28461 100644
--- a/tests/monotouch-test/Foundation/NSMutableDictionary2Test.cs
+++ b/tests/monotouch-test/Foundation/NSMutableDictionary2Test.cs
@@ -1,6 +1,3 @@
-
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -712,5 +709,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
diff --git a/tests/monotouch-test/Foundation/NSMutableDictionaryTest.cs b/tests/monotouch-test/Foundation/NSMutableDictionaryTest.cs
index 0c75a59b19..1b3a09d645 100644
--- a/tests/monotouch-test/Foundation/NSMutableDictionaryTest.cs
+++ b/tests/monotouch-test/Foundation/NSMutableDictionaryTest.cs
@@ -3,23 +3,8 @@ using System.Runtime.InteropServices;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
-
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
namespace monotouchtest
{
diff --git a/tests/monotouch-test/Foundation/NSMutableOrderedSet1Test.cs b/tests/monotouch-test/Foundation/NSMutableOrderedSet1Test.cs
index c5f5f5b36a..38ccec2f12 100644
--- a/tests/monotouch-test/Foundation/NSMutableOrderedSet1Test.cs
+++ b/tests/monotouch-test/Foundation/NSMutableOrderedSet1Test.cs
@@ -8,8 +8,6 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -415,5 +413,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
\ No newline at end of file
diff --git a/tests/monotouch-test/Foundation/NSMutableOrderedSetTest.cs b/tests/monotouch-test/Foundation/NSMutableOrderedSetTest.cs
index 21d5d40a88..2fc7eced5f 100644
--- a/tests/monotouch-test/Foundation/NSMutableOrderedSetTest.cs
+++ b/tests/monotouch-test/Foundation/NSMutableOrderedSetTest.cs
@@ -11,11 +11,7 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSMutableSet1Test.cs b/tests/monotouch-test/Foundation/NSMutableSet1Test.cs
index 6de9972ce9..f79c678c37 100644
--- a/tests/monotouch-test/Foundation/NSMutableSet1Test.cs
+++ b/tests/monotouch-test/Foundation/NSMutableSet1Test.cs
@@ -1,6 +1,3 @@
-
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -265,5 +262,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
diff --git a/tests/monotouch-test/Foundation/NSMutableSetTest.cs b/tests/monotouch-test/Foundation/NSMutableSetTest.cs
index 88bb8bc57a..effbea461a 100644
--- a/tests/monotouch-test/Foundation/NSMutableSetTest.cs
+++ b/tests/monotouch-test/Foundation/NSMutableSetTest.cs
@@ -11,11 +11,7 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSOrderedSet1Test.cs b/tests/monotouch-test/Foundation/NSOrderedSet1Test.cs
index 0dd235c16d..be8a78d9c6 100644
--- a/tests/monotouch-test/Foundation/NSOrderedSet1Test.cs
+++ b/tests/monotouch-test/Foundation/NSOrderedSet1Test.cs
@@ -8,8 +8,6 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -324,5 +322,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
\ No newline at end of file
diff --git a/tests/monotouch-test/Foundation/NSOrderedSetTest.cs b/tests/monotouch-test/Foundation/NSOrderedSetTest.cs
index 88bd1d4ff6..ea9d3302ab 100644
--- a/tests/monotouch-test/Foundation/NSOrderedSetTest.cs
+++ b/tests/monotouch-test/Foundation/NSOrderedSetTest.cs
@@ -11,11 +11,7 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSSet1Test.cs b/tests/monotouch-test/Foundation/NSSet1Test.cs
index afdeff84dc..d74bb5d3bc 100644
--- a/tests/monotouch-test/Foundation/NSSet1Test.cs
+++ b/tests/monotouch-test/Foundation/NSSet1Test.cs
@@ -1,6 +1,3 @@
-
-#if XAMCORE_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -205,5 +202,3 @@ namespace MonoTouchFixtures.Foundation {
}
}
}
-
-#endif // XAMCORE_2_0
diff --git a/tests/monotouch-test/Foundation/NSSetTest.cs b/tests/monotouch-test/Foundation/NSSetTest.cs
index 5f7aa47c67..05deb84dd1 100644
--- a/tests/monotouch-test/Foundation/NSSetTest.cs
+++ b/tests/monotouch-test/Foundation/NSSetTest.cs
@@ -2,11 +2,7 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSStreamTest.cs b/tests/monotouch-test/Foundation/NSStreamTest.cs
index bb22f63cc5..d9e727b87f 100644
--- a/tests/monotouch-test/Foundation/NSStreamTest.cs
+++ b/tests/monotouch-test/Foundation/NSStreamTest.cs
@@ -5,13 +5,8 @@ using System.Net;
using System.Net.Sockets;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSStringTest.cs b/tests/monotouch-test/Foundation/NSStringTest.cs
index a093167665..b18fc8ad12 100644
--- a/tests/monotouch-test/Foundation/NSStringTest.cs
+++ b/tests/monotouch-test/Foundation/NSStringTest.cs
@@ -1,13 +1,7 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
namespace monotouchtest
diff --git a/tests/monotouch-test/Foundation/NSTimeZoneTest.cs b/tests/monotouch-test/Foundation/NSTimeZoneTest.cs
index d1f341bf14..421937aab7 100644
--- a/tests/monotouch-test/Foundation/NSTimeZoneTest.cs
+++ b/tests/monotouch-test/Foundation/NSTimeZoneTest.cs
@@ -9,13 +9,8 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NSUrlSessionConfiguration.cs b/tests/monotouch-test/Foundation/NSUrlSessionConfiguration.cs
index 6e1344e54d..b9db99fa12 100644
--- a/tests/monotouch-test/Foundation/NSUrlSessionConfiguration.cs
+++ b/tests/monotouch-test/Foundation/NSUrlSessionConfiguration.cs
@@ -2,13 +2,8 @@
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NetServiceTest.cs b/tests/monotouch-test/Foundation/NetServiceTest.cs
index d61dd2d3f5..3a1988938e 100644
--- a/tests/monotouch-test/Foundation/NetServiceTest.cs
+++ b/tests/monotouch-test/Foundation/NetServiceTest.cs
@@ -10,17 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NotificationCenter.cs b/tests/monotouch-test/Foundation/NotificationCenter.cs
index a4ec8e103e..4236816ba6 100644
--- a/tests/monotouch-test/Foundation/NotificationCenter.cs
+++ b/tests/monotouch-test/Foundation/NotificationCenter.cs
@@ -10,13 +10,8 @@
using System;
using System.Diagnostics;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
@@ -99,7 +94,7 @@ namespace MonoTouchFixtures.Foundation {
}
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
[Test]
public void TargetedNotificationsTest ()
{
diff --git a/tests/monotouch-test/Foundation/NotificationQueueTest.cs b/tests/monotouch-test/Foundation/NotificationQueueTest.cs
index 1e07ded332..d264da7d1f 100644
--- a/tests/monotouch-test/Foundation/NotificationQueueTest.cs
+++ b/tests/monotouch-test/Foundation/NotificationQueueTest.cs
@@ -7,11 +7,7 @@
// Copyright 2013 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/NumberTest.cs b/tests/monotouch-test/Foundation/NumberTest.cs
index 22d16164c3..dbc2a1228f 100644
--- a/tests/monotouch-test/Foundation/NumberTest.cs
+++ b/tests/monotouch-test/Foundation/NumberTest.cs
@@ -8,23 +8,9 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
@@ -86,9 +72,6 @@ namespace MonoTouchFixtures.Foundation {
{
using (var a = new NSNumber (1))
using (var b = new NSNumber (1d)) {
-#if !XAMCORE_2_0
- Assert.True (a.IsEqualToNumber (b), "IsEqualToNumber");
-#endif
// Two objects that are equal return hash codes that are equal.
Assert.True (a.Equals (b), "Equals(NSNumber)");
Assert.True (b.Equals ((object) a), "Equals(Object)");
diff --git a/tests/monotouch-test/Foundation/ObjectTest.cs b/tests/monotouch-test/Foundation/ObjectTest.cs
index 7b62f71f81..2b4f9e984a 100644
--- a/tests/monotouch-test/Foundation/ObjectTest.cs
+++ b/tests/monotouch-test/Foundation/ObjectTest.cs
@@ -12,7 +12,6 @@ using System.Drawing;
using System.Reflection;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
@@ -25,25 +24,11 @@ using UIView = AppKit.NSView;
using UIKit;
using PlatformException=Foundation.MonoTouchException;
#endif
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using PlatformException=MonoTouch.Foundation.MonoTouchException;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
using RectangleF=CoreGraphics.CGRect;
using SizeF=CoreGraphics.CGSize;
using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
namespace MonoTouchFixtures.Foundation {
@@ -53,12 +38,8 @@ namespace MonoTouchFixtures.Foundation {
bool GetIsDirectBinding (NSObject obj)
{
-#if XAMCORE_2_0
int flags = (byte) typeof (NSObject).GetField ("flags", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic).GetValue (obj);
return (flags & 4) == 4;
-#else
- return (bool) typeof (NSObject).GetField ("IsDirectBinding", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic).GetValue (obj);
-#endif
}
class MyObject : NSObject {
@@ -93,7 +74,7 @@ namespace MonoTouchFixtures.Foundation {
public void FromObject_INativeObject ()
{
// https://bugzilla.xamarin.com/show_bug.cgi?id=8458
- using (CGPath p = CGPath.FromRect (new RectangleF (1, 2, 3, 4))) {
+ using (CGPath p = CGPath.FromRect (new CGRect (1, 2, 3, 4))) {
Assert.IsNotNull (NSObject.FromObject (p), "CGPath");
}
using (CGColor c = new CGColor (CGColorSpace.CreateDeviceRGB (), new nfloat [] { 0.1f, 0.2f, 0.3f, 1.0f })) {
@@ -114,7 +95,7 @@ namespace MonoTouchFixtures.Foundation {
[Test]
public void FromObject_Handle ()
{
- using (CGPath p = CGPath.FromRect (new RectangleF (1, 2, 3, 4))) {
+ using (CGPath p = CGPath.FromRect (new CGRect (1, 2, 3, 4))) {
Assert.IsNotNull (NSObject.FromObject (p.Handle), "CGPath");
}
using (CGColor c = new CGColor (CGColorSpace.CreateDeviceRGB (), new nfloat [] { 0.1f, 0.2f, 0.3f, 1.0f })) {
@@ -195,18 +176,6 @@ namespace MonoTouchFixtures.Foundation {
IntPtr nscoding = Runtime.GetProtocol ("NSCoding");
Assert.That (nscoding, Is.Not.EqualTo (IntPtr.Zero), "NSCoding");
-#if !XAMCORE_2_0
- // NSObject does not conform to NSCoding
- using (var o = new NSObject ()) {
- Assert.False (o.ConformsToProtocol (nscoding), "NSObject/NSCoding");
- using (var c = new NSCoder ()) {
- Assert.Throws (delegate {
- o.EncodeTo (c);
- }, "NSObject/!NSCoding");
- }
- }
-#endif
-
// NSNumber conforms to NSCoding
using (var n = new NSNumber (-1)) {
Assert.True (n.ConformsToProtocol (nscoding), "NSNumber/NSCoding");
@@ -218,20 +187,6 @@ namespace MonoTouchFixtures.Foundation {
}
}
-#if !XAMCORE_2_0
- [Test]
- public void CtorNSCoder ()
- {
- // NSObject does NOT conform but (funnily enough) does not have a .ctor(NSCoder) like every other
- // type that subclass it. We'll use NSKeyedUnarchiver as it also does not conform to NSCoding
- using (var c = new NSCoder ()) {
- Assert.Throws (delegate {
- new NSKeyedUnarchiver (c);
- }, "NSObject/!NSCoding");
- }
- }
-#endif
-
[Test]
public void Equality ()
{
@@ -317,7 +272,7 @@ namespace MonoTouchFixtures.Foundation {
Assert.AreEqual ("{X=0,Y=0,Width=123,Height=234}", @new.ToString (), "#new");
observed = true;
})) {
- o.Frame = new RectangleF (0, 0, 123, 234);
+ o.Frame = new CGRect (0, 0, 123, 234);
}
}
Assert.IsTrue (observed, "observed");
diff --git a/tests/monotouch-test/Foundation/OperationQueueTest.cs b/tests/monotouch-test/Foundation/OperationQueueTest.cs
index 85a4ad8aa5..cf002da040 100644
--- a/tests/monotouch-test/Foundation/OperationQueueTest.cs
+++ b/tests/monotouch-test/Foundation/OperationQueueTest.cs
@@ -8,13 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
@@ -30,11 +25,7 @@ namespace MonoTouchFixtures.Foundation {
{
using (var q = new NSOperationQueue ()) {
// Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[NSBlockOperation addExecutionBlock:]: block is nil
-#if XAMCORE_2_0
q.AddOperation ((Action) null);
-#else
- q.AddOperation ((NSAction) null);
-#endif
}
}
diff --git a/tests/monotouch-test/Foundation/OutputStreamTest.cs b/tests/monotouch-test/Foundation/OutputStreamTest.cs
index db5ecc5795..01bab67bb7 100644
--- a/tests/monotouch-test/Foundation/OutputStreamTest.cs
+++ b/tests/monotouch-test/Foundation/OutputStreamTest.cs
@@ -10,11 +10,7 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Foundation/ProtocolAttributeTest.cs b/tests/monotouch-test/Foundation/ProtocolAttributeTest.cs
index e0c2bcfb7a..717c235066 100644
--- a/tests/monotouch-test/Foundation/ProtocolAttributeTest.cs
+++ b/tests/monotouch-test/Foundation/ProtocolAttributeTest.cs
@@ -10,15 +10,9 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/RegularExpressionTest.cs b/tests/monotouch-test/Foundation/RegularExpressionTest.cs
index 3679dc85dd..c85ab928e7 100644
--- a/tests/monotouch-test/Foundation/RegularExpressionTest.cs
+++ b/tests/monotouch-test/Foundation/RegularExpressionTest.cs
@@ -9,13 +9,8 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/StringTest.cs b/tests/monotouch-test/Foundation/StringTest.cs
index 261e93c893..61dee5fbad 100644
--- a/tests/monotouch-test/Foundation/StringTest.cs
+++ b/tests/monotouch-test/Foundation/StringTest.cs
@@ -8,10 +8,10 @@
//
using System;
+using CoreGraphics;
#if !__WATCHOS__
using System.Drawing;
#endif
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -21,22 +21,8 @@ using UIStringAttributes = AppKit.NSStringAttributes;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
@@ -127,13 +113,13 @@ namespace MonoTouchFixtures.Foundation {
var f = UIFont.BoldSystemFontOfSize (actualFontSize);
try {
using (NSString s = new NSString ("s")) {
- SizeF size = s.DrawString (PointF.Empty, 20, f, 6, ref actualFontSize, UILineBreakMode.MiddleTruncation, UIBaselineAdjustment.None);
+ var size = s.DrawString (CGPoint.Empty, 20, f, 6, ref actualFontSize, UILineBreakMode.MiddleTruncation, UIBaselineAdjustment.None);
Assert.That (actualFontSize, Is.EqualTo ((nfloat) 12), "actualFontSize");
Assert.That (size.Width, Is.InRange ((nfloat) 6f, (nfloat) 7f), "Width");
Assert.That (size.Height, Is.InRange ((nfloat) 14f, (nfloat) 15f), "Height");
}
using (NSString s = new NSString ("saterlipopette")) {
- SizeF size = s.DrawString (PointF.Empty, 20, f, 6, ref actualFontSize, UILineBreakMode.MiddleTruncation, UIBaselineAdjustment.None);
+ var size = s.DrawString (CGPoint.Empty, 20, f, 6, ref actualFontSize, UILineBreakMode.MiddleTruncation, UIBaselineAdjustment.None);
Assert.That (actualFontSize, Is.EqualTo ((nfloat) 6), "actualFontSize-2");
Assert.That (size.Width, Is.InRange ((nfloat) 17f, (nfloat) 19f), "Width-2");
Assert.That (size.Height, Is.InRange ((nfloat) 7f, (nfloat) 8f), "Height-2");
@@ -153,13 +139,13 @@ namespace MonoTouchFixtures.Foundation {
var f = UIFont.BoldSystemFontOfSize (actualFontSize);
try {
using (NSString s = new NSString ("s")) {
- SizeF size = s.StringSize (f, 6, ref actualFontSize, 10, UILineBreakMode.MiddleTruncation);
+ var size = s.StringSize (f, 6, ref actualFontSize, 10, UILineBreakMode.MiddleTruncation);
Assert.That (actualFontSize, Is.EqualTo ((nfloat) 12), "actualFontSize");
Assert.That (size.Width, Is.InRange ((nfloat) 6f, (nfloat) 7f), "Width");
Assert.That (size.Height, Is.InRange ((nfloat) 14f, (nfloat) 15f), "Height");
}
using (NSString s = new NSString ("saterlipopette")) {
- SizeF size = s.StringSize (f, 6, ref actualFontSize, 10, UILineBreakMode.MiddleTruncation);
+ var size = s.StringSize (f, 6, ref actualFontSize, 10, UILineBreakMode.MiddleTruncation);
Assert.That (actualFontSize, Is.EqualTo ((nfloat) 6), "actualFontSize-2");
Assert.That (size.Width, Is.InRange ((nfloat) 5f, (nfloat) 10f), "Width-2");
Assert.That (size.Height, Is.InRange ((nfloat) 14f, (nfloat) 15f), "Height-2");
@@ -195,13 +181,13 @@ namespace MonoTouchFixtures.Foundation {
NSStringDrawingOptions options = NSStringDrawingOptions.OneShot;
var attrib = new UIStringAttributes ();
using (var dict = new NSDictionary ()) {
- Assert.DoesNotThrow (() => s.GetBoundingRect (new SizeF (5, 5), options, attrib, null), "GetBoundingRect 1");
- Assert.DoesNotThrow (() => s.WeakGetBoundingRect (new SizeF (5, 5), options, dict, null), "WeakGetBoundingRect 1");
- Assert.DoesNotThrow (() => s.DrawString (new RectangleF (0, 0, 10, 10), options, attrib, null), "DrawString 1");
- Assert.DoesNotThrow (() => s.WeakDrawString (new RectangleF (0, 0, 10, 10), options, dict, null), "WeakDrawString 1");
+ Assert.DoesNotThrow (() => s.GetBoundingRect (new CGSize (5, 5), options, attrib, null), "GetBoundingRect 1");
+ Assert.DoesNotThrow (() => s.WeakGetBoundingRect (new CGSize (5, 5), options, dict, null), "WeakGetBoundingRect 1");
+ Assert.DoesNotThrow (() => s.DrawString (new CGRect (0, 0, 10, 10), options, attrib, null), "DrawString 1");
+ Assert.DoesNotThrow (() => s.WeakDrawString (new CGRect (0, 0, 10, 10), options, dict, null), "WeakDrawString 1");
#if !MONOMAC //WeakDrawString on mac doesn't have versions with these parameters
- Assert.DoesNotThrow (() => s.WeakDrawString (new RectangleF (0, 0, 10, 10), dict), "WeakDrawString 2");
- Assert.DoesNotThrow (() => s.WeakDrawString (new PointF (0, 0), dict), "WeakDrawString 3");
+ Assert.DoesNotThrow (() => s.WeakDrawString (new CGRect (0, 0, 10, 10), dict), "WeakDrawString 2");
+ Assert.DoesNotThrow (() => s.WeakDrawString (new CGPoint (0, 0), dict), "WeakDrawString 3");
#endif
}
}
@@ -216,11 +202,7 @@ namespace MonoTouchFixtures.Foundation {
NSString.Empty.DangerousRelease ();
NSString.Empty.DangerousRelease ();
-#if XAMCORE_2_0
Assert.That (NSString.Empty.RetainCount, Is.EqualTo (nuint.MaxValue), "RetainCount");
-#else
- Assert.That (NSString.Empty.RetainCount, Is.EqualTo (-1), "RetainCount");
-#endif
Assert.That (NSString.Empty.Compare (new NSString (string.Empty)), Is.EqualTo (NSComparisonResult.Same), "Same");
}
diff --git a/tests/monotouch-test/Foundation/ThreadTest.cs b/tests/monotouch-test/Foundation/ThreadTest.cs
index 3ff42932c5..3cc1e59119 100644
--- a/tests/monotouch-test/Foundation/ThreadTest.cs
+++ b/tests/monotouch-test/Foundation/ThreadTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using System.Threading;
using System.Threading.Tasks;
diff --git a/tests/monotouch-test/Foundation/TimerTest.cs b/tests/monotouch-test/Foundation/TimerTest.cs
index 747d1d763e..f05f77e72e 100644
--- a/tests/monotouch-test/Foundation/TimerTest.cs
+++ b/tests/monotouch-test/Foundation/TimerTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using System.Threading;
using System.Threading.Tasks;
@@ -58,7 +53,6 @@ namespace MonoTouchFixtures.Foundation {
{
}
-#if XAMCORE_2_0
[Test]
public void CreateTimer_NewSignature ()
{
@@ -86,6 +80,5 @@ namespace MonoTouchFixtures.Foundation {
thread.Join ();
}
}
-#endif
}
}
diff --git a/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs b/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs
index e2e0590996..733707ce50 100644
--- a/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs
+++ b/tests/monotouch-test/Foundation/UbiquitousKeyValueStoreTest.cs
@@ -9,13 +9,8 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using System.Threading;
using System.Threading.Tasks;
diff --git a/tests/monotouch-test/Foundation/UrlConnectionTest.cs b/tests/monotouch-test/Foundation/UrlConnectionTest.cs
index 6fae4372fd..f5cf7d9e1b 100644
--- a/tests/monotouch-test/Foundation/UrlConnectionTest.cs
+++ b/tests/monotouch-test/Foundation/UrlConnectionTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -16,11 +15,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Foundation/UrlCredentialTest.cs b/tests/monotouch-test/Foundation/UrlCredentialTest.cs
index dd3a9984dc..e9b7275073 100644
--- a/tests/monotouch-test/Foundation/UrlCredentialTest.cs
+++ b/tests/monotouch-test/Foundation/UrlCredentialTest.cs
@@ -9,7 +9,6 @@
using System;
using System.Security.Cryptography.X509Certificates;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using Security;
@@ -18,11 +17,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTouchFixtures.Security;
diff --git a/tests/monotouch-test/Foundation/UrlProtectionSpaceTest.cs b/tests/monotouch-test/Foundation/UrlProtectionSpaceTest.cs
index eb5ef3dccb..30523259bb 100644
--- a/tests/monotouch-test/Foundation/UrlProtectionSpaceTest.cs
+++ b/tests/monotouch-test/Foundation/UrlProtectionSpaceTest.cs
@@ -9,7 +9,6 @@
using System;
using System.Security.Cryptography.X509Certificates;
-#if XAMCORE_2_0
using Foundation;
using Security;
#if MONOMAC
@@ -17,25 +16,10 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTouchFixtures.Security;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
diff --git a/tests/monotouch-test/Foundation/UrlProtocolTest.cs b/tests/monotouch-test/Foundation/UrlProtocolTest.cs
index 0381ddeed8..5afef654a7 100644
--- a/tests/monotouch-test/Foundation/UrlProtocolTest.cs
+++ b/tests/monotouch-test/Foundation/UrlProtocolTest.cs
@@ -12,7 +12,6 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -20,11 +19,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Foundation/UrlRequestTest.cs b/tests/monotouch-test/Foundation/UrlRequestTest.cs
index b41583cf92..6a53d2e1cb 100644
--- a/tests/monotouch-test/Foundation/UrlRequestTest.cs
+++ b/tests/monotouch-test/Foundation/UrlRequestTest.cs
@@ -7,13 +7,8 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/UrlSessionConfigurationTest.cs b/tests/monotouch-test/Foundation/UrlSessionConfigurationTest.cs
index 57905fd9f2..87268c4643 100644
--- a/tests/monotouch-test/Foundation/UrlSessionConfigurationTest.cs
+++ b/tests/monotouch-test/Foundation/UrlSessionConfigurationTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using Security;
using ObjCRuntime;
@@ -17,12 +16,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/UrlSessionTaskMetricsTest.cs b/tests/monotouch-test/Foundation/UrlSessionTaskMetricsTest.cs
index 4b7b9c65c0..87fc52d444 100644
--- a/tests/monotouch-test/Foundation/UrlSessionTaskMetricsTest.cs
+++ b/tests/monotouch-test/Foundation/UrlSessionTaskMetricsTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -16,11 +15,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs b/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs
index a51a255908..22271ec358 100644
--- a/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs
+++ b/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -16,11 +15,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs b/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs
index cc569bba4f..2c0e45c1e2 100644
--- a/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs
+++ b/tests/monotouch-test/Foundation/UrlSessionTaskTransactionMetricsTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -16,11 +15,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/UrlSessionTest.cs b/tests/monotouch-test/Foundation/UrlSessionTest.cs
index 8fa831e136..75dfa894c5 100644
--- a/tests/monotouch-test/Foundation/UrlSessionTest.cs
+++ b/tests/monotouch-test/Foundation/UrlSessionTest.cs
@@ -10,7 +10,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -18,11 +17,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Foundation/UrlTest.cs b/tests/monotouch-test/Foundation/UrlTest.cs
index f5d93b864e..d0c1563d16 100644
--- a/tests/monotouch-test/Foundation/UrlTest.cs
+++ b/tests/monotouch-test/Foundation/UrlTest.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -17,11 +16,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
@@ -249,13 +243,7 @@ namespace MonoTouchFixtures.Foundation {
using (var url1 = NSUrl.FromString ("http://www.xamarin.com"))
using (var url2 = new BadCustomUrl ("http://www.xamarin.com"))
using (var url3 = new GoodCustomUrl ("http://www.xamarin.com")) {
-#if XAMCORE_2_0
- // for compatibility only unified has the correct behavior
Assert.That (url1.GetHashCode (), Is.Not.EqualTo (url2.GetHashCode ()), "GetHashCode 1-2");
-#else
- // state is ignored in classic
- Assert.That (url1.GetHashCode (), Is.EqualTo (url2.GetHashCode ()), "GetHashCode 1-2");
-#endif
Assert.That (url2.GetHashCode (), Is.Not.EqualTo (url3.GetHashCode ()), "GetHashCode 2-3");
Assert.False (url2.DirectBinding, "DirectBinding 2");
@@ -263,37 +251,16 @@ namespace MonoTouchFixtures.Foundation {
Assert.That (url2.GetHashCode (), Is.Not.EqualTo (url3.GetHashCode ()), "GetHashCode 2-3");
// NSObject
-#if XAMCORE_2_0
- // for compatibility only unified has the correct behavior
Assert.False (url1.Equals ((NSObject) url2), "Equals(NSObject) 1-2");
Assert.False (url2.Equals ((NSObject) url3), "Equals(NSObject) 2-3");
-#else
- // state is ignored in classic
- Assert.True (url1.Equals ((NSObject) url2), "Equals(NSObject) 1-2");
- Assert.True (url2.Equals ((NSObject) url3), "Equals(NSObject) 2-3");
-#endif
// NSUrl / IEquatable
-#if XAMCORE_2_0
- // for compatibility only unified has the correct behavior
Assert.False (url1.Equals (url2), "Equals(NSUrl) 1-2");
Assert.False (url2.Equals (url3), "Equals(NSUrl) 2-3");
-#else
- // otherwise it's ObjC comparing the URL string
- Assert.True (url1.Equals (url2), "Equals(NSUrl) 1-2");
- Assert.True (url2.Equals (url3), "Equals(NSUrl) 2-3");
-#endif
// System.Object
-#if XAMCORE_2_0
- // for compatibility only unified has the correct behavior
Assert.False (url1.Equals ((object) url2), "Equals(object) 1-2");
Assert.False (url2.Equals ((object) url3), "Equals(object) 2-3");
-#else
- // state is ignored in classic
- Assert.True (url1.Equals ((object) url2), "Equals(object) 1-2");
- Assert.True (url2.Equals ((object) url3), "Equals(object) 2-3");
-#endif
}
}
diff --git a/tests/monotouch-test/Foundation/UserDefaultsTest.cs b/tests/monotouch-test/Foundation/UserDefaultsTest.cs
index d0f540fc6a..4b41d44a37 100644
--- a/tests/monotouch-test/Foundation/UserDefaultsTest.cs
+++ b/tests/monotouch-test/Foundation/UserDefaultsTest.cs
@@ -8,7 +8,6 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -16,23 +15,8 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Foundation {
[TestFixture]
diff --git a/tests/monotouch-test/Foundation/UuidTest.cs b/tests/monotouch-test/Foundation/UuidTest.cs
index fcfe7539d3..6ef0466f91 100644
--- a/tests/monotouch-test/Foundation/UuidTest.cs
+++ b/tests/monotouch-test/Foundation/UuidTest.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -17,11 +16,6 @@ using AppKit;
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/Foundation/ZoneTest.cs b/tests/monotouch-test/Foundation/ZoneTest.cs
index 78d8156a4e..72ec86ac5f 100644
--- a/tests/monotouch-test/Foundation/ZoneTest.cs
+++ b/tests/monotouch-test/Foundation/ZoneTest.cs
@@ -9,11 +9,7 @@
using System;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Foundation {
diff --git a/tests/monotouch-test/GLKit/BaseEffectTest.cs b/tests/monotouch-test/GLKit/BaseEffectTest.cs
index 5e8759821c..17a25ad74e 100644
--- a/tests/monotouch-test/GLKit/BaseEffectTest.cs
+++ b/tests/monotouch-test/GLKit/BaseEffectTest.cs
@@ -4,27 +4,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using GLKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GLKit;
-#endif
using OpenTK;
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.GLKit {
[TestFixture]
diff --git a/tests/monotouch-test/GLKit/EffectPropertyFog.cs b/tests/monotouch-test/GLKit/EffectPropertyFog.cs
index e95c18192a..ab323595a1 100644
--- a/tests/monotouch-test/GLKit/EffectPropertyFog.cs
+++ b/tests/monotouch-test/GLKit/EffectPropertyFog.cs
@@ -4,14 +4,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using GLKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GLKit;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/GLKit/EffectPropertyLightTest.cs b/tests/monotouch-test/GLKit/EffectPropertyLightTest.cs
index 3883363308..04c50b1620 100644
--- a/tests/monotouch-test/GLKit/EffectPropertyLightTest.cs
+++ b/tests/monotouch-test/GLKit/EffectPropertyLightTest.cs
@@ -4,14 +4,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using GLKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GLKit;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/GLKit/EffectPropertyMaterialTest.cs b/tests/monotouch-test/GLKit/EffectPropertyMaterialTest.cs
index a65a8ae497..96117407da 100644
--- a/tests/monotouch-test/GLKit/EffectPropertyMaterialTest.cs
+++ b/tests/monotouch-test/GLKit/EffectPropertyMaterialTest.cs
@@ -4,14 +4,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using GLKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GLKit;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/GLKit/EffectPropertyTransformTest.cs b/tests/monotouch-test/GLKit/EffectPropertyTransformTest.cs
index fcc4a9c1d3..4988eedcba 100644
--- a/tests/monotouch-test/GLKit/EffectPropertyTransformTest.cs
+++ b/tests/monotouch-test/GLKit/EffectPropertyTransformTest.cs
@@ -4,14 +4,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using GLKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GLKit;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/GLKit/KViewTest.cs b/tests/monotouch-test/GLKit/KViewTest.cs
index a1af2946d3..cbd04d849d 100644
--- a/tests/monotouch-test/GLKit/KViewTest.cs
+++ b/tests/monotouch-test/GLKit/KViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using GLKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GLKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.GLKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.GLKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (GLKView glkv = new GLKView (frame)) {
Assert.That (glkv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/GameController/ExtendedGamepadSnapshotTest.cs b/tests/monotouch-test/GameController/ExtendedGamepadSnapshotTest.cs
index e991498b58..89a8fa83cb 100644
--- a/tests/monotouch-test/GameController/ExtendedGamepadSnapshotTest.cs
+++ b/tests/monotouch-test/GameController/ExtendedGamepadSnapshotTest.cs
@@ -10,17 +10,11 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
#endif
using GameController;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameController;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameController {
diff --git a/tests/monotouch-test/GameController/GamepadSnapshotTest.cs b/tests/monotouch-test/GameController/GamepadSnapshotTest.cs
index 28702649d2..61a7fad93d 100644
--- a/tests/monotouch-test/GameController/GamepadSnapshotTest.cs
+++ b/tests/monotouch-test/GameController/GamepadSnapshotTest.cs
@@ -10,17 +10,11 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
#endif
using GameController;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameController;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameController {
diff --git a/tests/monotouch-test/GameKit/LeaderboardTest.cs b/tests/monotouch-test/GameKit/LeaderboardTest.cs
index 12addab698..011824744d 100644
--- a/tests/monotouch-test/GameKit/LeaderboardTest.cs
+++ b/tests/monotouch-test/GameKit/LeaderboardTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -19,23 +18,8 @@ using AppKit;
using UIKit;
#endif
using GameKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.GameKit {
[TestFixture]
diff --git a/tests/monotouch-test/GameKit/LeaderboardViewControllerTest.cs b/tests/monotouch-test/GameKit/LeaderboardViewControllerTest.cs
index 6f7180509d..461d343baf 100644
--- a/tests/monotouch-test/GameKit/LeaderboardViewControllerTest.cs
+++ b/tests/monotouch-test/GameKit/LeaderboardViewControllerTest.cs
@@ -12,7 +12,6 @@
using System;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -21,11 +20,6 @@ using AppKit;
using UIKit;
#endif
using GameKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameKit {
diff --git a/tests/monotouch-test/GameKit/NotificationBannerTest.cs b/tests/monotouch-test/GameKit/NotificationBannerTest.cs
index 6325c21210..f76cc29ae2 100644
--- a/tests/monotouch-test/GameKit/NotificationBannerTest.cs
+++ b/tests/monotouch-test/GameKit/NotificationBannerTest.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using GameKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameKit {
diff --git a/tests/monotouch-test/GameKit/ScoreTest.cs b/tests/monotouch-test/GameKit/ScoreTest.cs
index 4e0e72841a..7bb0dbe539 100644
--- a/tests/monotouch-test/GameKit/ScoreTest.cs
+++ b/tests/monotouch-test/GameKit/ScoreTest.cs
@@ -12,7 +12,6 @@
using System;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -21,23 +20,8 @@ using AppKit;
using UIKit;
#endif
using GameKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.GameKit {
[TestFixture]
diff --git a/tests/monotouch-test/GameKit/SessionTest.cs b/tests/monotouch-test/GameKit/SessionTest.cs
index 0efe06886b..a1386ab549 100644
--- a/tests/monotouch-test/GameKit/SessionTest.cs
+++ b/tests/monotouch-test/GameKit/SessionTest.cs
@@ -12,13 +12,8 @@
using System;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using GameKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameKit {
diff --git a/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs b/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs
index 5b006d46a4..8571c1503d 100644
--- a/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs
+++ b/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs
@@ -13,13 +13,8 @@
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-#endif
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
using MatrixFloat3x3 = global::OpenTK.NMatrix3;
diff --git a/tests/monotouch-test/GameplayKit/GKComponentSystemTests.cs b/tests/monotouch-test/GameplayKit/GKComponentSystemTests.cs
index 027fca024c..74d490467e 100644
--- a/tests/monotouch-test/GameplayKit/GKComponentSystemTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKComponentSystemTests.cs
@@ -9,18 +9,12 @@
//
#if !__WATCHOS__
-#if XAMCORE_2_0 // The GKComponentSystem framework is Unified only
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GamePlayKit {
@@ -75,5 +69,4 @@ namespace MonoTouchFixtures.GamePlayKit {
}
}
-#endif // XAMCORE_2_0
#endif // !__WATCHOS__
diff --git a/tests/monotouch-test/GameplayKit/GKEntityTests.cs b/tests/monotouch-test/GameplayKit/GKEntityTests.cs
index 45f268fed9..7712898ae7 100644
--- a/tests/monotouch-test/GameplayKit/GKEntityTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKEntityTests.cs
@@ -13,13 +13,8 @@
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GamePlayKit {
diff --git a/tests/monotouch-test/GameplayKit/GKGridGraphTests.cs b/tests/monotouch-test/GameplayKit/GKGridGraphTests.cs
index a95a7f59b0..645531f9ef 100644
--- a/tests/monotouch-test/GameplayKit/GKGridGraphTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKGridGraphTests.cs
@@ -14,13 +14,8 @@ using System;
using System.Collections.Generic;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GamePlayKit {
diff --git a/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs b/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs
index a375439170..693213fa5c 100644
--- a/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using OpenTK;
diff --git a/tests/monotouch-test/GameplayKit/GKNoiseMapTests.cs b/tests/monotouch-test/GameplayKit/GKNoiseMapTests.cs
index 1865d6eaa7..61c6940059 100644
--- a/tests/monotouch-test/GameplayKit/GKNoiseMapTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKNoiseMapTests.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using OpenTK;
diff --git a/tests/monotouch-test/GameplayKit/GKNoiseTests.cs b/tests/monotouch-test/GameplayKit/GKNoiseTests.cs
index f07486a780..1c456c8d72 100644
--- a/tests/monotouch-test/GameplayKit/GKNoiseTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKNoiseTests.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using OpenTK;
diff --git a/tests/monotouch-test/GameplayKit/GKOctreeTests.cs b/tests/monotouch-test/GameplayKit/GKOctreeTests.cs
index 5a82a4d218..88fb51e298 100644
--- a/tests/monotouch-test/GameplayKit/GKOctreeTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKOctreeTests.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using OpenTK;
diff --git a/tests/monotouch-test/GameplayKit/GKPathTests.cs b/tests/monotouch-test/GameplayKit/GKPathTests.cs
index f277c97865..bdb44b0348 100644
--- a/tests/monotouch-test/GameplayKit/GKPathTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKPathTests.cs
@@ -13,13 +13,8 @@
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GamePlayKit {
diff --git a/tests/monotouch-test/GameplayKit/GKPolygonObstacleTests.cs b/tests/monotouch-test/GameplayKit/GKPolygonObstacleTests.cs
index 0567591840..b58cde2499 100644
--- a/tests/monotouch-test/GameplayKit/GKPolygonObstacleTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKPolygonObstacleTests.cs
@@ -13,14 +13,8 @@
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-using nuint = System.UInt32;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GamePlayKit {
diff --git a/tests/monotouch-test/GameplayKit/GKQuadTreeTests.cs b/tests/monotouch-test/GameplayKit/GKQuadTreeTests.cs
index dc6b4d638f..a4d76ca408 100644
--- a/tests/monotouch-test/GameplayKit/GKQuadTreeTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKQuadTreeTests.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using OpenTK;
diff --git a/tests/monotouch-test/GameplayKit/GKStateMachineTests.cs b/tests/monotouch-test/GameplayKit/GKStateMachineTests.cs
index edf678e34c..4e32a58e92 100644
--- a/tests/monotouch-test/GameplayKit/GKStateMachineTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKStateMachineTests.cs
@@ -13,15 +13,9 @@
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameplayKit {
diff --git a/tests/monotouch-test/GameplayKit/GKStateTests.cs b/tests/monotouch-test/GameplayKit/GKStateTests.cs
index fb48923d5b..a5aa35d0ec 100644
--- a/tests/monotouch-test/GameplayKit/GKStateTests.cs
+++ b/tests/monotouch-test/GameplayKit/GKStateTests.cs
@@ -13,15 +13,9 @@
using System;
using OpenTK;
-#if XAMCORE_2_0
using Foundation;
using GameplayKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.GameplayKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.GameplayKit {
diff --git a/tests/monotouch-test/HealthKit/AnchoredObjectQueryTest.cs b/tests/monotouch-test/HealthKit/AnchoredObjectQueryTest.cs
index 2954f7d20c..8f5be1799f 100644
--- a/tests/monotouch-test/HealthKit/AnchoredObjectQueryTest.cs
+++ b/tests/monotouch-test/HealthKit/AnchoredObjectQueryTest.cs
@@ -11,23 +11,11 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using HealthKit;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.HealthKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if !XAMCORE_2_0
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.HealthKit {
[TestFixture]
diff --git a/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs b/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs
index d67583f10c..13dba89ccb 100644
--- a/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs
+++ b/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs
@@ -11,15 +11,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using HealthKit;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.HealthKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.HealthKit {
diff --git a/tests/monotouch-test/HealthKit/CdaDocumentSampleTest.cs b/tests/monotouch-test/HealthKit/CdaDocumentSampleTest.cs
index 6f3b9e4bff..e111519d1e 100644
--- a/tests/monotouch-test/HealthKit/CdaDocumentSampleTest.cs
+++ b/tests/monotouch-test/HealthKit/CdaDocumentSampleTest.cs
@@ -10,15 +10,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using HealthKit;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.HealthKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.HealthKit {
diff --git a/tests/monotouch-test/HealthKit/ErrorTest.cs b/tests/monotouch-test/HealthKit/ErrorTest.cs
index 4789d70c39..9773217ac5 100644
--- a/tests/monotouch-test/HealthKit/ErrorTest.cs
+++ b/tests/monotouch-test/HealthKit/ErrorTest.cs
@@ -11,15 +11,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using HealthKit;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.HealthKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.HealthKit {
diff --git a/tests/monotouch-test/HealthKit/ObjectTypeTest.cs b/tests/monotouch-test/HealthKit/ObjectTypeTest.cs
index bacb8152d8..0b7a5ad638 100644
--- a/tests/monotouch-test/HealthKit/ObjectTypeTest.cs
+++ b/tests/monotouch-test/HealthKit/ObjectTypeTest.cs
@@ -11,23 +11,11 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using HealthKit;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.HealthKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if !XAMCORE_2_0
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.HealthKit {
[TestFixture]
diff --git a/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs b/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs
index 67af56a1b5..446fe5b2f4 100644
--- a/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs
+++ b/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs
@@ -11,15 +11,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using HealthKit;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.HealthKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.HealthKit {
diff --git a/tests/monotouch-test/HttpClient/HttpClientTest.cs b/tests/monotouch-test/HttpClient/HttpClientTest.cs
index 452b8f9a99..f08e13086b 100644
--- a/tests/monotouch-test/HttpClient/HttpClientTest.cs
+++ b/tests/monotouch-test/HttpClient/HttpClientTest.cs
@@ -4,12 +4,8 @@ using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/ImageIO/CGImageSourceTest.cs b/tests/monotouch-test/ImageIO/CGImageSourceTest.cs
index 8f2a034b48..55d35f0413 100644
--- a/tests/monotouch-test/ImageIO/CGImageSourceTest.cs
+++ b/tests/monotouch-test/ImageIO/CGImageSourceTest.cs
@@ -2,19 +2,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreGraphics;
using ImageIO;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ImageIO;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ImageIO {
diff --git a/tests/monotouch-test/ImageIO/ImageDestinationTest.cs b/tests/monotouch-test/ImageIO/ImageDestinationTest.cs
index 9aec0bf3ab..b0f526d7c0 100644
--- a/tests/monotouch-test/ImageIO/ImageDestinationTest.cs
+++ b/tests/monotouch-test/ImageIO/ImageDestinationTest.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -18,12 +17,6 @@ using UIKit;
#endif
using CoreGraphics;
using ImageIO;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ImageIO;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ImageIO {
@@ -39,13 +32,8 @@ namespace MonoTouchFixtures.ImageIO {
public void FromData_BadITU ()
{
using (NSMutableData destData = new NSMutableData ()) {
-#if XAMCORE_2_0 // FromData => Create
Assert.Null (CGImageDestination.Create (destData, BadUti, 1), "FromData-1");
Assert.Null (CGImageDestination.Create (destData, BadUti, 1, new CGImageDestinationOptions ()), "FromData-2");
-#else
- Assert.Null (CGImageDestination.FromData (destData, BadUti, 1), "FromData-1");
- Assert.Null (CGImageDestination.FromData (destData, BadUti, 1, new CGImageDestinationOptions ()), "FromData-2");
-#endif
}
}
@@ -53,18 +41,10 @@ namespace MonoTouchFixtures.ImageIO {
public void FromData_GoodITU ()
{
using (NSMutableData destData = new NSMutableData ()) {
-#if XAMCORE_2_0 // FromData => Create
using (var id = CGImageDestination.Create (destData, GoodUti, 1)) {
-#else
- using (var id = CGImageDestination.FromData (destData, GoodUti, 1)) {
-#endif
Assert.That (id.Handle, Is.Not.EqualTo (IntPtr.Zero), "handle-1");
}
-#if XAMCORE_2_0 // FromData => Create
using (var id = CGImageDestination.Create (destData, GoodUti, 1, new CGImageDestinationOptions ())) {
-#else
- using (var id = CGImageDestination.FromData (destData, GoodUti, 1, new CGImageDestinationOptions ())) {
-#endif
Assert.That (id.Handle, Is.Not.EqualTo (IntPtr.Zero), "handle-2");
}
}
@@ -98,12 +78,7 @@ namespace MonoTouchFixtures.ImageIO {
public void FromUrl_BadITU ()
{
using (NSUrl url = NSUrl.FromString ("file://local")) {
-#if XAMCORE_2_0 // FromUrl => Create
Assert.Null (CGImageDestination.Create (url, BadUti, 1), "FromUrl-1");
-#else
- Assert.Null (CGImageDestination.FromUrl (url, BadUti, 1), "FromUrl-1");
- Assert.Null (CGImageDestination.FromUrl (url, BadUti, 1, new CGImageDestinationOptions ()), "FromUrl-2");
-#endif
}
}
@@ -118,11 +93,7 @@ namespace MonoTouchFixtures.ImageIO {
using (var uiimg = UIImage.FromFile (file))
#endif
using (var img = uiimg.CGImage)
-#if XAMCORE_2_0 // FromData => Create
using (var id = CGImageDestination.Create (destData, GoodUti, 1)) {
-#else
- using (var id = CGImageDestination.FromData (destData, GoodUti, 1)) {
-#endif
id.AddImage (img, (NSDictionary) null);
}
}
@@ -140,11 +111,7 @@ namespace MonoTouchFixtures.ImageIO {
using (var uiimg = UIImage.FromFile (file))
#endif
using (var img = uiimg.CGImage)
-#if XAMCORE_2_0 // FromData => Create
using (var id = CGImageDestination.Create (destData, GoodUti, 1))
-#else
- using (var id = CGImageDestination.FromData (destData, GoodUti, 1))
-#endif
using (var mutable = new CGMutableImageMetadata ()) {
id.AddImageAndMetadata (img, mutable, (NSDictionary) null);
}
@@ -162,11 +129,7 @@ namespace MonoTouchFixtures.ImageIO {
#endif
using (var source = CGImageSource.FromData (data))
using (NSMutableData destData = new NSMutableData ())
-#if XAMCORE_2_0 // FromData => Create
using (var id = CGImageDestination.Create (destData, GoodUti, 1)) {
-#else
- using (var id = CGImageDestination.FromData (destData, GoodUti, 1)) {
-#endif
NSError err;
// testing that null is allowed (no crash) so the fact that is return false and an error does not matter
Assert.False (id.CopyImageSource (source, (NSDictionary) null, out err), "CopyImageSource");
diff --git a/tests/monotouch-test/ImageIO/ImageMetadataTagTest.cs b/tests/monotouch-test/ImageIO/ImageMetadataTagTest.cs
index efe16e5a5d..1d83101e11 100644
--- a/tests/monotouch-test/ImageIO/ImageMetadataTagTest.cs
+++ b/tests/monotouch-test/ImageIO/ImageMetadataTagTest.cs
@@ -9,17 +9,9 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ImageIO;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ImageIO;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ImageIO {
diff --git a/tests/monotouch-test/ImageIO/ImageMetadataTest.cs b/tests/monotouch-test/ImageIO/ImageMetadataTest.cs
index a37a279f23..eb63e37f0a 100644
--- a/tests/monotouch-test/ImageIO/ImageMetadataTest.cs
+++ b/tests/monotouch-test/ImageIO/ImageMetadataTest.cs
@@ -8,16 +8,9 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ImageIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ImageIO;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ImageIO {
diff --git a/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs b/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs
index d2b275affb..2f03aff2de 100644
--- a/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs
+++ b/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs
@@ -8,16 +8,9 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ImageIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ImageIO;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ImageIO {
diff --git a/tests/monotouch-test/Intents/INIntentResolutionResultTests.cs b/tests/monotouch-test/Intents/INIntentResolutionResultTests.cs
index 91a92ca778..3b50a669dc 100644
--- a/tests/monotouch-test/Intents/INIntentResolutionResultTests.cs
+++ b/tests/monotouch-test/Intents/INIntentResolutionResultTests.cs
@@ -8,7 +8,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//
-#if !__TVOS__ && XAMCORE_2_0 && !MONOMAC
+#if !__TVOS__ && !MONOMAC
using System;
using NUnit.Framework;
diff --git a/tests/monotouch-test/JavascriptCore/ContextTest.cs b/tests/monotouch-test/JavascriptCore/ContextTest.cs
index dedcbbf6c6..be0522bb95 100644
--- a/tests/monotouch-test/JavascriptCore/ContextTest.cs
+++ b/tests/monotouch-test/JavascriptCore/ContextTest.cs
@@ -10,14 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using JavaScriptCore;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.JavaScriptCore;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.JavascriptCore {
diff --git a/tests/monotouch-test/JavascriptCore/JSExportTest.cs b/tests/monotouch-test/JavascriptCore/JSExportTest.cs
index 1b176415b5..23f40bc3fa 100644
--- a/tests/monotouch-test/JavascriptCore/JSExportTest.cs
+++ b/tests/monotouch-test/JavascriptCore/JSExportTest.cs
@@ -5,16 +5,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using JavaScriptCore;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.JavaScriptCore;
-using MonoTouch.UIKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using XamarinTests.ObjCRuntime;
diff --git a/tests/monotouch-test/JavascriptCore/ValueTest.cs b/tests/monotouch-test/JavascriptCore/ValueTest.cs
index 29ee9d4b8e..a40d54c0f4 100644
--- a/tests/monotouch-test/JavascriptCore/ValueTest.cs
+++ b/tests/monotouch-test/JavascriptCore/ValueTest.cs
@@ -10,14 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using JavaScriptCore;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.JavaScriptCore;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.JavascriptCore {
diff --git a/tests/monotouch-test/Main.cs b/tests/monotouch-test/Main.cs
index 4dac5a2141..82ffb9031a 100644
--- a/tests/monotouch-test/Main.cs
+++ b/tests/monotouch-test/Main.cs
@@ -2,15 +2,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using System.Runtime.InteropServices;
namespace monotouchtest
diff --git a/tests/monotouch-test/MapKit/AnnotationViewTest.cs b/tests/monotouch-test/MapKit/AnnotationViewTest.cs
index 9ff054fcfc..ee4bdf5331 100644
--- a/tests/monotouch-test/MapKit/AnnotationViewTest.cs
+++ b/tests/monotouch-test/MapKit/AnnotationViewTest.cs
@@ -5,9 +5,9 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using MapKit;
+using CoreGraphics;
using ObjCRuntime;
#if MONOMAC
using PlatformImage = AppKit.NSImage;
@@ -17,23 +17,8 @@ using UIKit;
using PlatformImage = UIKit.UIImage;
using PlatformView = UIKit.UIView;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
class AnnotationViewPoker : MKAnnotationView {
@@ -51,11 +36,7 @@ namespace MonoTouchFixtures.MapKit {
return NSObject.IsNewRefcountEnabled ();
}
-#if XAMCORE_2_0
public AnnotationViewPoker (IMKAnnotation annotation) : base (annotation, "reuse")
-#else
- public AnnotationViewPoker (NSObject annotation) : base (annotation, "reuse")
-#endif
{
}
@@ -79,7 +60,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKAnnotationView av = new MKAnnotationView (frame)) {
Assert.That (av.Frame, Is.EqualTo (frame), "Frame");
Assert.Null (av.Annotation, "Annotation");
@@ -115,9 +96,9 @@ namespace MonoTouchFixtures.MapKit {
{
using (var def = new MKAnnotationView ()) {
Assert.IsNull (def.Annotation, "Annotation");
- Assert.AreEqual (def.CalloutOffset, PointF.Empty, "CalloutOffset");
+ Assert.AreEqual (def.CalloutOffset, CGPoint.Empty, "CalloutOffset");
Assert.IsFalse (def.CanShowCallout, "CanShowCallout");
- Assert.AreEqual (def.CenterOffset, PointF.Empty, "CenterOffset");
+ Assert.AreEqual (def.CenterOffset, CGPoint.Empty, "CenterOffset");
Assert.IsFalse (def.Draggable, "Draggable");
Assert.That (def.DragState, Is.EqualTo (MKAnnotationViewDragState.None), "DragState");
Assert.IsTrue (def.Enabled, "Enabled");
diff --git a/tests/monotouch-test/MapKit/CircleViewTest.cs b/tests/monotouch-test/MapKit/CircleViewTest.cs
index 0eabcf43e9..6a3a54e6b2 100644
--- a/tests/monotouch-test/MapKit/CircleViewTest.cs
+++ b/tests/monotouch-test/MapKit/CircleViewTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MapKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
class CircleViewPoker : MKCircleView {
@@ -63,7 +49,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKCircleView cv = new MKCircleView (frame)) {
Assert.That (cv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/MapKit/GeometryTest.cs b/tests/monotouch-test/MapKit/GeometryTest.cs
index a762df9b50..ebc82b909b 100644
--- a/tests/monotouch-test/MapKit/GeometryTest.cs
+++ b/tests/monotouch-test/MapKit/GeometryTest.cs
@@ -1,14 +1,9 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/LocalSearchRequestTest.cs b/tests/monotouch-test/MapKit/LocalSearchRequestTest.cs
index 3ce1f0f3ce..7db2b02043 100644
--- a/tests/monotouch-test/MapKit/LocalSearchRequestTest.cs
+++ b/tests/monotouch-test/MapKit/LocalSearchRequestTest.cs
@@ -10,17 +10,10 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreLocation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/LocalSearchTest.cs b/tests/monotouch-test/MapKit/LocalSearchTest.cs
index 42aa6fde3e..ce89fb4e5b 100644
--- a/tests/monotouch-test/MapKit/LocalSearchTest.cs
+++ b/tests/monotouch-test/MapKit/LocalSearchTest.cs
@@ -10,17 +10,10 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreLocation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/MapRectTest.cs b/tests/monotouch-test/MapKit/MapRectTest.cs
index f0533a142f..c9dc4be304 100644
--- a/tests/monotouch-test/MapKit/MapRectTest.cs
+++ b/tests/monotouch-test/MapKit/MapRectTest.cs
@@ -2,17 +2,10 @@
#if !__TVOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MapKit;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-using MonoTouch.CoreGraphics;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/MapViewTest.cs b/tests/monotouch-test/MapKit/MapViewTest.cs
index d3b41ba92e..8ed87bad42 100644
--- a/tests/monotouch-test/MapKit/MapViewTest.cs
+++ b/tests/monotouch-test/MapKit/MapViewTest.cs
@@ -6,30 +6,15 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
using MapKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
class MapViewPoker : MKMapView {
@@ -91,7 +76,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKMapView mv = new MKMapView (frame)) {
Assert.That (mv.Frame, Is.EqualTo (frame), "Frame");
}
@@ -104,13 +89,8 @@ namespace MonoTouchFixtures.MapKit {
Assert.Inconclusive ("backing fields are removed when newrefcount is enabled");
using (var a = new MKCircle ()) // MKAnnotation is abstract
-#if XAMCORE_2_0
using (var o1 = new MKPolygon ()) // it must export 'coordinate' or this will fail
using (var o2 = new MKPolyline ())
-#else
- using (NSObject o1 = new MKPolygon ()) // it must export 'coordinate' or this will fail
- using (NSObject o2 = new MKPolyline ())
-#endif
using (var mv = new MapViewPoker ()) {
Assert.Null (mv.AnnotationsBackingField, "1a");
Assert.That (mv.Annotations, Is.Empty, "1b");
@@ -123,11 +103,7 @@ namespace MonoTouchFixtures.MapKit {
Assert.That (mv.AnnotationsBackingField, Is.Empty, "3a");
Assert.That (mv.Annotations, Is.Empty, "3b");
-#if XAMCORE_2_0
mv.AddAnnotation (o1);
-#else
- mv.AddAnnotationObject (o1);
-#endif
Assert.AreSame (o1, mv.AnnotationsBackingField [0], "4a");
Assert.AreSame (o1, mv.Annotations [0], "4b");
@@ -135,20 +111,12 @@ namespace MonoTouchFixtures.MapKit {
Assert.That (mv.AnnotationsBackingField, Is.Empty, "5a");
Assert.That (mv.Annotations, Is.Empty, "5b");
-#if XAMCORE_2_0
mv.AddAnnotations (new IMKAnnotation[] { o1, o2 });
-#else
- mv.AddAnnotationObjects (new NSObject[] { o1, o2 });
-#endif
// don't assume ordering
Assert.That (mv.AnnotationsBackingField.Length, Is.EqualTo (2), "6a");
Assert.That (mv.Annotations.Length, Is.EqualTo (2), "6b");
-#if XAMCORE_2_0
mv.RemoveAnnotations (new IMKAnnotation[] { o2, o1 });
-#else
- mv.RemoveAnnotations (new NSObject[] { o2, o1 });
-#endif
Assert.That (mv.AnnotationsBackingField, Is.Empty, "7a");
Assert.That (mv.Annotations, Is.Empty, "7b");
}
@@ -171,13 +139,8 @@ namespace MonoTouchFixtures.MapKit {
#endif
using (var a = new MKCircle ()) // MKAnnotation is abstract
-#if XAMCORE_2_0
using (var o1 = new MKPolygon ()) // it must export 'coordinate' or this will fail
using (var o2 = new MKPolyline ())
-#else
- using (NSObject o1 = new MKPolygon ()) // it must export 'coordinate' or this will fail
- using (NSObject o2 = new MKPolyline ())
-#endif
using (var mv = new MapViewPoker ()) {
Assert.Null (mv.SelectedAnnotationsBackingField, "1a");
Assert.Null (mv.SelectedAnnotations, "1b"); // not an empty array
@@ -190,11 +153,7 @@ namespace MonoTouchFixtures.MapKit {
Assert.Null (mv.AnnotationsBackingField, "3a");
Assert.That (mv.Annotations, Is.Empty, "3b");
-#if XAMCORE_2_0
mv.SelectedAnnotations = new IMKAnnotation[] { o1, o2 };
-#else
- mv.SelectedAnnotations = new NSObject[] { o1, o2 };
-#endif
// note: when assigning the property only the first item is selected (by design)
// so we're not exactly backing up correctly (we still hold 'o2')
// OTOH we do not want to recursively [PostGet] the same property (unless handled by the generator)
@@ -214,19 +173,10 @@ namespace MonoTouchFixtures.MapKit {
if (MapViewPoker.NewRefcountEnabled ())
Assert.Inconclusive ("backing fields are removed when newrefcount is enabled");
-#if XAMCORE_2_0
using (var o1 = new MKPolygon ()) // it must export 'boundingMapRect' or this will fail
using (var o2 = new MKPolyline ())
-#else
- using (NSObject o1 = new MKPolygon ()) // it must export 'boundingMapRect' or this will fail
- using (NSObject o2 = new MKPolyline ())
-#endif
using (var mv = new MapViewPoker ()) {
-#if XAMCORE_2_0
var overlays = new IMKOverlay [] { o1, o2 };
-#else
- var overlays = new NSObject [] { o1, o2 };
-#endif
Assert.Null (mv.OverlaysBackingField, "1a");
Assert.Null (mv.Overlays, "1b"); // not an empty array
@@ -277,11 +227,7 @@ namespace MonoTouchFixtures.MapKit {
mv.RemoveOverlay (polygon);
Assert.That (mv.Overlays, Is.Empty, "2");
-#if XAMCORE_2_0
IMKOverlay[] list = { polygon, polyline, circle };
-#else
- NSObject[] list = { polygon, polyline, circle };
-#endif
mv.AddOverlays (list);
Assert.That (mv.Overlays.Length, Is.EqualTo (3), "3");
mv.RemoveOverlays (list);
diff --git a/tests/monotouch-test/MapKit/OverlayPathRendererTest.cs b/tests/monotouch-test/MapKit/OverlayPathRendererTest.cs
index 790214d86a..909e63fab6 100644
--- a/tests/monotouch-test/MapKit/OverlayPathRendererTest.cs
+++ b/tests/monotouch-test/MapKit/OverlayPathRendererTest.cs
@@ -10,17 +10,10 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using CoreLocation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/OverlayPathViewTest.cs b/tests/monotouch-test/MapKit/OverlayPathViewTest.cs
index 217379c5ec..ad673d37b1 100644
--- a/tests/monotouch-test/MapKit/OverlayPathViewTest.cs
+++ b/tests/monotouch-test/MapKit/OverlayPathViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MapKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKOverlayPathView opv = new MKOverlayPathView (frame)) {
Assert.That (opv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/MapKit/OverlayViewTest.cs b/tests/monotouch-test/MapKit/OverlayViewTest.cs
index 28f359f232..d01b72bbb8 100644
--- a/tests/monotouch-test/MapKit/OverlayViewTest.cs
+++ b/tests/monotouch-test/MapKit/OverlayViewTest.cs
@@ -7,25 +7,11 @@ using System;
using System.Drawing;
#endif
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MapKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
class OverlayViewPoker : MKOverlayView {
@@ -43,11 +29,7 @@ namespace MonoTouchFixtures.MapKit {
return NSObject.IsNewRefcountEnabled ();
}
-#if XAMCORE_2_0
public OverlayViewPoker (IMKOverlay overlay) : base (overlay)
-#else
- public OverlayViewPoker (NSObject overlay) : base (overlay)
-#endif
{
}
@@ -65,7 +47,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKOverlayView ov = new MKOverlayView (frame)) {
Assert.That (ov.Frame, Is.EqualTo (frame), "Frame");
Assert.Null (ov.Overlay, "Overlay");
diff --git a/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs b/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs
index b1cfb49b4b..644ef4f952 100644
--- a/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs
+++ b/tests/monotouch-test/MapKit/PinAnnotationViewTest.cs
@@ -11,7 +11,7 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MapKit;
using ObjCRuntime;
@@ -20,11 +20,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
@@ -68,7 +63,7 @@ namespace MonoTouchFixtures.MapKit {
TestRuntime.AssertSystemVersion (PlatformName.iOS, 7, 0, throwIfOtherPlatform: false);
#endif
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (var av = new MKPinAnnotationView (frame)) {
Assert.That (av.Frame.ToString (), Is.EqualTo (frame.ToString ()), "Frame"); // fp comparison fails
Assert.Null (av.Annotation, "Annotation");
diff --git a/tests/monotouch-test/MapKit/PolygonTest.cs b/tests/monotouch-test/MapKit/PolygonTest.cs
index a36e0c0889..a9469d39ef 100644
--- a/tests/monotouch-test/MapKit/PolygonTest.cs
+++ b/tests/monotouch-test/MapKit/PolygonTest.cs
@@ -4,16 +4,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreLocation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/PolygonViewTest.cs b/tests/monotouch-test/MapKit/PolygonViewTest.cs
index 9a0b681ad9..d7fe52945f 100644
--- a/tests/monotouch-test/MapKit/PolygonViewTest.cs
+++ b/tests/monotouch-test/MapKit/PolygonViewTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MapKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
class PolygonViewPoker : MKPolygonView {
@@ -63,7 +49,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKPolygonView pv = new MKPolygonView (frame)) {
Assert.That (pv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/MapKit/PolylineTest.cs b/tests/monotouch-test/MapKit/PolylineTest.cs
index 1c831065d3..e2b13c730d 100644
--- a/tests/monotouch-test/MapKit/PolylineTest.cs
+++ b/tests/monotouch-test/MapKit/PolylineTest.cs
@@ -4,17 +4,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreLocation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/PolylineViewTest.cs b/tests/monotouch-test/MapKit/PolylineViewTest.cs
index 9d7f1917b4..86f28697f9 100644
--- a/tests/monotouch-test/MapKit/PolylineViewTest.cs
+++ b/tests/monotouch-test/MapKit/PolylineViewTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MapKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MapKit {
class PolylineViewPoker : MKPolylineView {
@@ -63,7 +49,7 @@ namespace MonoTouchFixtures.MapKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MKPolylineView pl = new MKPolylineView (frame)) {
Assert.That (pl.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/MapKit/ShapeTest.cs b/tests/monotouch-test/MapKit/ShapeTest.cs
index f0f7cdf4f1..a01ea33fc0 100644
--- a/tests/monotouch-test/MapKit/ShapeTest.cs
+++ b/tests/monotouch-test/MapKit/ShapeTest.cs
@@ -4,16 +4,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using CoreLocation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreLocation;
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MapKit {
diff --git a/tests/monotouch-test/MapKit/UserTrackingBarButtonItemTest.cs b/tests/monotouch-test/MapKit/UserTrackingBarButtonItemTest.cs
index f7e6f31281..8e039f5f9d 100644
--- a/tests/monotouch-test/MapKit/UserTrackingBarButtonItemTest.cs
+++ b/tests/monotouch-test/MapKit/UserTrackingBarButtonItemTest.cs
@@ -12,15 +12,9 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using MapKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MapKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MediaAccessibility/AudibleMediaTest.cs b/tests/monotouch-test/MediaAccessibility/AudibleMediaTest.cs
index d5c7bffb8e..cef38bdf3d 100644
--- a/tests/monotouch-test/MediaAccessibility/AudibleMediaTest.cs
+++ b/tests/monotouch-test/MediaAccessibility/AudibleMediaTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaAccessibility;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaAccessibility;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaAccessibility {
diff --git a/tests/monotouch-test/MediaAccessibility/CaptionAppearanceTest.cs b/tests/monotouch-test/MediaAccessibility/CaptionAppearanceTest.cs
index 77be934bbe..c667cbfd3d 100644
--- a/tests/monotouch-test/MediaAccessibility/CaptionAppearanceTest.cs
+++ b/tests/monotouch-test/MediaAccessibility/CaptionAppearanceTest.cs
@@ -10,14 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaAccessibility;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaAccessibility;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaAccessibility {
diff --git a/tests/monotouch-test/MediaPlayer/MediaItemArtworkTest.cs b/tests/monotouch-test/MediaPlayer/MediaItemArtworkTest.cs
index 5758708b1b..f15bea6751 100644
--- a/tests/monotouch-test/MediaPlayer/MediaItemArtworkTest.cs
+++ b/tests/monotouch-test/MediaPlayer/MediaItemArtworkTest.cs
@@ -5,15 +5,10 @@
using System;
using System.IO;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MediaPlayer;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer {
@@ -30,9 +25,9 @@ namespace MonoTouchFixtures.MediaPlayer {
using (var img = UIImage.FromFile (file))
using (var mia = new MPMediaItemArtwork (img)) {
Assert.That (img.Size.ToString (), Is.EqualTo ("{Width=32, Height=32}"), "original");
- var upscale = mia.ImageWithSize (new SizeF (100, 100));
+ var upscale = mia.ImageWithSize (new CGSize (100, 100));
Assert.That (upscale.Size.ToString (), Is.EqualTo ("{Width=32, Height=32}"), "upscale");
- var downscale = mia.ImageWithSize (new SizeF (16, 16));
+ var downscale = mia.ImageWithSize (new CGSize (16, 16));
Assert.That (downscale.Size.ToString (), Is.EqualTo ("{Width=32, Height=32}"), "downscale");
}
}
diff --git a/tests/monotouch-test/MediaPlayer/MediaItemTest.cs b/tests/monotouch-test/MediaPlayer/MediaItemTest.cs
index 9a34c47bcd..403f742096 100644
--- a/tests/monotouch-test/MediaPlayer/MediaItemTest.cs
+++ b/tests/monotouch-test/MediaPlayer/MediaItemTest.cs
@@ -4,15 +4,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer {
diff --git a/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs b/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs
index 94b390fea5..12b816e1fc 100644
--- a/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs
+++ b/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs
@@ -10,18 +10,11 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using UIKit;
using iAd;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.UIKit;
-using MonoTouch.iAd;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer {
diff --git a/tests/monotouch-test/MediaPlayer/NowPlayingInfoCenterTest.cs b/tests/monotouch-test/MediaPlayer/NowPlayingInfoCenterTest.cs
index 31d312678f..a9deccd903 100644
--- a/tests/monotouch-test/MediaPlayer/NowPlayingInfoCenterTest.cs
+++ b/tests/monotouch-test/MediaPlayer/NowPlayingInfoCenterTest.cs
@@ -5,17 +5,10 @@
using System;
using System.Drawing;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer
diff --git a/tests/monotouch-test/MediaPlayer/PlayableContentManagerTest.cs b/tests/monotouch-test/MediaPlayer/PlayableContentManagerTest.cs
index 09aa4aa3e8..4bc2a1ab85 100644
--- a/tests/monotouch-test/MediaPlayer/PlayableContentManagerTest.cs
+++ b/tests/monotouch-test/MediaPlayer/PlayableContentManagerTest.cs
@@ -10,16 +10,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer {
@@ -29,7 +23,6 @@ namespace MonoTouchFixtures.MediaPlayer {
public class PlayableContentManagerTest {
class DataSource : MPPlayableContentDataSource {
-#if XAMCORE_2_0
#region implemented abstract members of MPPlayableContentDataSource
public override MPContentItem ContentItem (NSIndexPath indexPath)
{
@@ -40,7 +33,6 @@ namespace MonoTouchFixtures.MediaPlayer {
throw new NotImplementedException ();
}
#endregion
-#endif
}
class Delegate : MPPlayableContentDelegate {
diff --git a/tests/monotouch-test/MediaPlayer/RemoteCommandCenterTest.cs b/tests/monotouch-test/MediaPlayer/RemoteCommandCenterTest.cs
index f670191085..3fdc6cbf9d 100644
--- a/tests/monotouch-test/MediaPlayer/RemoteCommandCenterTest.cs
+++ b/tests/monotouch-test/MediaPlayer/RemoteCommandCenterTest.cs
@@ -10,20 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-#if !MONOMAC
-using MonoTouch.UIKit;
-#endif
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer {
diff --git a/tests/monotouch-test/MediaPlayer/SkipIntervalCommandTest.cs b/tests/monotouch-test/MediaPlayer/SkipIntervalCommandTest.cs
index 5353bdc982..3b05bc5e6f 100644
--- a/tests/monotouch-test/MediaPlayer/SkipIntervalCommandTest.cs
+++ b/tests/monotouch-test/MediaPlayer/SkipIntervalCommandTest.cs
@@ -10,20 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaPlayer;
using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-#if !MONOMAC
-using MonoTouch.UIKit;
-#endif
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaPlayer {
diff --git a/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs b/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs
index 6535ef6e54..cd99c78f85 100644
--- a/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs
+++ b/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using MediaPlayer;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaPlayer;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MediaPlayer {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.MediaPlayer {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (MPVolumeView vv = new MPVolumeView (frame)) {
Assert.That (vv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/MediaToolbox/AudioProcessingTapTest.cs b/tests/monotouch-test/MediaToolbox/AudioProcessingTapTest.cs
index 9a15b614e8..b34655cf02 100644
--- a/tests/monotouch-test/MediaToolbox/AudioProcessingTapTest.cs
+++ b/tests/monotouch-test/MediaToolbox/AudioProcessingTapTest.cs
@@ -11,30 +11,12 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using MediaToolbox;
using AudioToolbox;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.MediaToolbox;
-using MonoTouch.AudioToolbox;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.MediaToolbox
{
[TestFixture]
@@ -50,11 +32,7 @@ namespace MonoTouchFixtures.MediaToolbox
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false);
var cb = new MTAudioProcessingTapCallbacks (
-#if XAMCORE_2_0
delegate(MTAudioProcessingTap tap, nint numberFrames, MTAudioProcessingTapFlags flags, AudioBuffers bufferList, out nint numberFramesOut, out MTAudioProcessingTapFlags flagsOut) {
-#else
- delegate(MTAudioProcessingTap tap, long numberFrames, MTAudioProcessingTapFlags flags, AudioBuffers bufferList, out long numberFramesOut, out MTAudioProcessingTapFlags flagsOut) {
-#endif
numberFramesOut = 2;
flagsOut = MTAudioProcessingTapFlags.StartOfStream;
});
diff --git a/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs b/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs
index adf8cf046e..5dcefc475d 100644
--- a/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs
+++ b/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs
@@ -2,19 +2,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreMedia;
using Foundation;
#if !MONOMAC
using UIKit;
#endif
using MediaToolbox;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.CoreMedia;
-using MonoTouch.MediaToolbox;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaToolbox {
diff --git a/tests/monotouch-test/MediaToolbox/ProfessionalVideoWorkflowTest.cs b/tests/monotouch-test/MediaToolbox/ProfessionalVideoWorkflowTest.cs
index 405b1907b6..5102c1ae19 100644
--- a/tests/monotouch-test/MediaToolbox/ProfessionalVideoWorkflowTest.cs
+++ b/tests/monotouch-test/MediaToolbox/ProfessionalVideoWorkflowTest.cs
@@ -1,13 +1,8 @@
#if MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using MediaToolbox;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MediaToolbox;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MediaToolbox {
diff --git a/tests/monotouch-test/MessageUI/MailComposeViewControllerTest.cs b/tests/monotouch-test/MessageUI/MailComposeViewControllerTest.cs
index 339ebc47fe..8eeced1cf7 100644
--- a/tests/monotouch-test/MessageUI/MailComposeViewControllerTest.cs
+++ b/tests/monotouch-test/MessageUI/MailComposeViewControllerTest.cs
@@ -11,16 +11,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using MessageUI;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MessageUI;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MessageUI {
diff --git a/tests/monotouch-test/MessageUI/MessageComposeViewControllerTest.cs b/tests/monotouch-test/MessageUI/MessageComposeViewControllerTest.cs
index b5a294fcc4..8b67d14b41 100644
--- a/tests/monotouch-test/MessageUI/MessageComposeViewControllerTest.cs
+++ b/tests/monotouch-test/MessageUI/MessageComposeViewControllerTest.cs
@@ -11,16 +11,10 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using MessageUI;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MessageUI;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MessageUI {
diff --git a/tests/monotouch-test/Messages/MSMessageTest.cs b/tests/monotouch-test/Messages/MSMessageTest.cs
index ec3c4a08f3..5a4ae8bfbf 100644
--- a/tests/monotouch-test/Messages/MSMessageTest.cs
+++ b/tests/monotouch-test/Messages/MSMessageTest.cs
@@ -10,13 +10,8 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using Messages;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Messages;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Messages
diff --git a/tests/monotouch-test/Metal/ClearValueTest.cs b/tests/monotouch-test/Metal/ClearValueTest.cs
index e42be63420..6431fac53b 100644
--- a/tests/monotouch-test/Metal/ClearValueTest.cs
+++ b/tests/monotouch-test/Metal/ClearValueTest.cs
@@ -3,11 +3,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/DeviceTest.cs b/tests/monotouch-test/Metal/DeviceTest.cs
index 665dd19450..063387ae45 100644
--- a/tests/monotouch-test/Metal/DeviceTest.cs
+++ b/tests/monotouch-test/Metal/DeviceTest.cs
@@ -3,11 +3,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/HeapDescriptorTest.cs b/tests/monotouch-test/Metal/HeapDescriptorTest.cs
index 9b21930ac3..d60d6c82c3 100644
--- a/tests/monotouch-test/Metal/HeapDescriptorTest.cs
+++ b/tests/monotouch-test/Metal/HeapDescriptorTest.cs
@@ -2,13 +2,8 @@
using System;
-#if XAMCORE_2_0
using ObjCRuntime;
using Metal;
-#else
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs b/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs
index 9b3e01c204..88b04e628f 100644
--- a/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs
+++ b/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLAttributeDescriptorTest.cs b/tests/monotouch-test/Metal/MTLAttributeDescriptorTest.cs
index f084e9529a..2b58e1c25a 100644
--- a/tests/monotouch-test/Metal/MTLAttributeDescriptorTest.cs
+++ b/tests/monotouch-test/Metal/MTLAttributeDescriptorTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLAttributeTest.cs b/tests/monotouch-test/Metal/MTLAttributeTest.cs
index ba12ca0004..e5e5ce0483 100644
--- a/tests/monotouch-test/Metal/MTLAttributeTest.cs
+++ b/tests/monotouch-test/Metal/MTLAttributeTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLBufferLayoutDescriptorTest.cs b/tests/monotouch-test/Metal/MTLBufferLayoutDescriptorTest.cs
index 47279c5114..fe12c48bdf 100644
--- a/tests/monotouch-test/Metal/MTLBufferLayoutDescriptorTest.cs
+++ b/tests/monotouch-test/Metal/MTLBufferLayoutDescriptorTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLDeviceTests.cs b/tests/monotouch-test/Metal/MTLDeviceTests.cs
index fda276028c..d918049213 100644
--- a/tests/monotouch-test/Metal/MTLDeviceTests.cs
+++ b/tests/monotouch-test/Metal/MTLDeviceTests.cs
@@ -8,11 +8,7 @@ using CoreFoundation;
using Foundation;
using ObjCRuntime;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLFunctionConstantTest.cs b/tests/monotouch-test/Metal/MTLFunctionConstantTest.cs
index bb492f69c3..b8f597567a 100644
--- a/tests/monotouch-test/Metal/MTLFunctionConstantTest.cs
+++ b/tests/monotouch-test/Metal/MTLFunctionConstantTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLIndirectCommandBufferDescriptorTest.cs b/tests/monotouch-test/Metal/MTLIndirectCommandBufferDescriptorTest.cs
index 2f569b3323..76001ce05e 100644
--- a/tests/monotouch-test/Metal/MTLIndirectCommandBufferDescriptorTest.cs
+++ b/tests/monotouch-test/Metal/MTLIndirectCommandBufferDescriptorTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs b/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs
index 6b5808b408..57d1e3f3d6 100644
--- a/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs
+++ b/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLPointerTypeTests.cs b/tests/monotouch-test/Metal/MTLPointerTypeTests.cs
index 71286abcaa..79143a4dd5 100644
--- a/tests/monotouch-test/Metal/MTLPointerTypeTests.cs
+++ b/tests/monotouch-test/Metal/MTLPointerTypeTests.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLSharedEventListenerTest.cs b/tests/monotouch-test/Metal/MTLSharedEventListenerTest.cs
index a65be266cd..5d7600c9b2 100644
--- a/tests/monotouch-test/Metal/MTLSharedEventListenerTest.cs
+++ b/tests/monotouch-test/Metal/MTLSharedEventListenerTest.cs
@@ -2,13 +2,8 @@
using System;
-#if XAMCORE_2_0
using CoreFoundation;
using Metal;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLStageInRegionIndirectArgumentsTest.cs b/tests/monotouch-test/Metal/MTLStageInRegionIndirectArgumentsTest.cs
index 8f3c52e1cc..fea3a8a4b2 100644
--- a/tests/monotouch-test/Metal/MTLStageInRegionIndirectArgumentsTest.cs
+++ b/tests/monotouch-test/Metal/MTLStageInRegionIndirectArgumentsTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLStageInputOutputDescriptorTest.cs b/tests/monotouch-test/Metal/MTLStageInputOutputDescriptorTest.cs
index e248bf9273..41567c275f 100644
--- a/tests/monotouch-test/Metal/MTLStageInputOutputDescriptorTest.cs
+++ b/tests/monotouch-test/Metal/MTLStageInputOutputDescriptorTest.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLTextureReferenceType.cs b/tests/monotouch-test/Metal/MTLTextureReferenceType.cs
index c88f89a9af..4e1b5ed552 100644
--- a/tests/monotouch-test/Metal/MTLTextureReferenceType.cs
+++ b/tests/monotouch-test/Metal/MTLTextureReferenceType.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs b/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs
index db3fd3ebbd..cd5302e5e1 100644
--- a/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs
+++ b/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs b/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs
index 98dc6f95d7..060e1fe97a 100644
--- a/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs
+++ b/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs
@@ -2,11 +2,7 @@
using System;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Metal/StructTest.cs b/tests/monotouch-test/Metal/StructTest.cs
index dd401501b5..9d5dcc750f 100644
--- a/tests/monotouch-test/Metal/StructTest.cs
+++ b/tests/monotouch-test/Metal/StructTest.cs
@@ -3,11 +3,7 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Metal;
-#else
-using MonoTouch.Metal;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MetalPerformanceShaders/ImageScaleTest.cs b/tests/monotouch-test/MetalPerformanceShaders/ImageScaleTest.cs
index 6d2633470e..67e8741d22 100644
--- a/tests/monotouch-test/MetalPerformanceShaders/ImageScaleTest.cs
+++ b/tests/monotouch-test/MetalPerformanceShaders/ImageScaleTest.cs
@@ -4,13 +4,8 @@ using System;
using Foundation;
using ObjCRuntime;
-#if XAMCORE_2_0
using Metal;
using MetalPerformanceShaders;
-#else
-using MonoTouch.Metal;
-using MonoTouch.MetalPerformanceShaders;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MetalPerformanceShaders/KernelTest.cs b/tests/monotouch-test/MetalPerformanceShaders/KernelTest.cs
index ea3b9bf343..518268ec13 100644
--- a/tests/monotouch-test/MetalPerformanceShaders/KernelTest.cs
+++ b/tests/monotouch-test/MetalPerformanceShaders/KernelTest.cs
@@ -6,13 +6,8 @@ using System;
using Foundation;
using ObjCRuntime;
-#if XAMCORE_2_0
using Metal;
using MetalPerformanceShaders;
-#else
-using MonoTouch.Metal;
-using MonoTouch.MetalPerformanceShaders;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs
index 4140664bfa..64f82d794a 100644
--- a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs
+++ b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs
@@ -5,13 +5,8 @@
using System;
using ObjCRuntime;
-#if XAMCORE_2_0
using Metal;
using MetalPerformanceShaders;
-#else
-using MonoTouch.Metal;
-using MonoTouch.MetalPerformanceShaders;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs
index 2b34be9f33..7777e3b1ba 100644
--- a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs
+++ b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs
@@ -5,13 +5,8 @@
using System;
using ObjCRuntime;
-#if XAMCORE_2_0
using Metal;
using MetalPerformanceShaders;
-#else
-using MonoTouch.Metal;
-using MonoTouch.MetalPerformanceShaders;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs
index 5178d2448d..f140217c6e 100644
--- a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs
+++ b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs
@@ -5,13 +5,8 @@
using System;
using ObjCRuntime;
-#if XAMCORE_2_0
using Metal;
using MetalPerformanceShaders;
-#else
-using MonoTouch.Metal;
-using MonoTouch.MetalPerformanceShaders;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs b/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs
index ddf7808b20..6108e6f22b 100644
--- a/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs
+++ b/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs
@@ -9,17 +9,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using MobileCoreServices;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.MobileCoreServices;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MobileCoreServices {
diff --git a/tests/monotouch-test/ModelIO/MDLAnimatedValueTypesTests.cs b/tests/monotouch-test/ModelIO/MDLAnimatedValueTypesTests.cs
index b14d5c6673..abbedc5438 100644
--- a/tests/monotouch-test/ModelIO/MDLAnimatedValueTypesTests.cs
+++ b/tests/monotouch-test/ModelIO/MDLAnimatedValueTypesTests.cs
@@ -12,7 +12,6 @@
using System;
using System.Linq;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
#if !MONOMAC
@@ -23,16 +22,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
using System.Runtime.InteropServices;
diff --git a/tests/monotouch-test/ModelIO/MDLAssetTest.cs b/tests/monotouch-test/ModelIO/MDLAssetTest.cs
index 2e61f01617..9f0f580bf7 100644
--- a/tests/monotouch-test/ModelIO/MDLAssetTest.cs
+++ b/tests/monotouch-test/ModelIO/MDLAssetTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
#if !MONOMAC
@@ -21,16 +20,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLCameraTest.cs b/tests/monotouch-test/ModelIO/MDLCameraTest.cs
index eca373eae5..5e38b9c3f9 100644
--- a/tests/monotouch-test/ModelIO/MDLCameraTest.cs
+++ b/tests/monotouch-test/ModelIO/MDLCameraTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
#if !MONOMAC
@@ -21,16 +20,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
diff --git a/tests/monotouch-test/ModelIO/MDLLight.cs b/tests/monotouch-test/ModelIO/MDLLight.cs
index c2fd9e5f3b..7e399cb4ff 100644
--- a/tests/monotouch-test/ModelIO/MDLLight.cs
+++ b/tests/monotouch-test/ModelIO/MDLLight.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
#if !MONOMAC
@@ -21,16 +20,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs b/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs
index 9fa21b4400..4bd80cb107 100644
--- a/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs
+++ b/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -23,15 +22,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
using MatrixFloat3x3 = global::OpenTK.NMatrix3;
diff --git a/tests/monotouch-test/ModelIO/MDLMesh.cs b/tests/monotouch-test/ModelIO/MDLMesh.cs
index 8428388e4a..3e8941ccb6 100644
--- a/tests/monotouch-test/ModelIO/MDLMesh.cs
+++ b/tests/monotouch-test/ModelIO/MDLMesh.cs
@@ -10,22 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !__TVOS__
using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs b/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs
index b3b8552f4c..6203c4a5af 100644
--- a/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs
+++ b/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLObject.cs b/tests/monotouch-test/ModelIO/MDLObject.cs
index 7ff6f611eb..4764e320a1 100644
--- a/tests/monotouch-test/ModelIO/MDLObject.cs
+++ b/tests/monotouch-test/ModelIO/MDLObject.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ModelIO;
@@ -19,14 +18,6 @@ using SceneKit;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SceneKit;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs b/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs
index e053bef34b..d93163f174 100644
--- a/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs
+++ b/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
#if !MONOMAC
@@ -21,16 +20,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
diff --git a/tests/monotouch-test/ModelIO/MDLTexture.cs b/tests/monotouch-test/ModelIO/MDLTexture.cs
index c07c83c67a..44e5350099 100644
--- a/tests/monotouch-test/ModelIO/MDLTexture.cs
+++ b/tests/monotouch-test/ModelIO/MDLTexture.cs
@@ -10,22 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !__TVOS__
using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLTransform.cs b/tests/monotouch-test/ModelIO/MDLTransform.cs
index 4a36429e36..71ca06c550 100644
--- a/tests/monotouch-test/ModelIO/MDLTransform.cs
+++ b/tests/monotouch-test/ModelIO/MDLTransform.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
@@ -20,15 +19,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
diff --git a/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs b/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs
index b4b7bc69fc..d911e3f15e 100644
--- a/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs
+++ b/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
@@ -20,15 +19,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
diff --git a/tests/monotouch-test/ModelIO/MDLVertexAttribute.cs b/tests/monotouch-test/ModelIO/MDLVertexAttribute.cs
index 77b3ba104a..ddb4467036 100644
--- a/tests/monotouch-test/ModelIO/MDLVertexAttribute.cs
+++ b/tests/monotouch-test/ModelIO/MDLVertexAttribute.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
@@ -20,15 +19,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs b/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs
index efaad1d9a7..1977a5462b 100644
--- a/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs
+++ b/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
#if !MONOMAC
@@ -21,16 +20,6 @@ using MultipeerConnectivity;
#endif
using ModelIO;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-#if !__TVOS__
-using MonoTouch.MultipeerConnectivity;
-#endif
-using MonoTouch.UIKit;
-using MonoTouch.ModelIO;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/MultipeerConnectivity/PeerIDTest.cs b/tests/monotouch-test/MultipeerConnectivity/PeerIDTest.cs
index 182d52be26..75e91390de 100644
--- a/tests/monotouch-test/MultipeerConnectivity/PeerIDTest.cs
+++ b/tests/monotouch-test/MultipeerConnectivity/PeerIDTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using MultipeerConnectivity;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MultipeerConnectivity;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.MultipeerConnectivity {
diff --git a/tests/monotouch-test/MultipeerConnectivity/SessionTest.cs b/tests/monotouch-test/MultipeerConnectivity/SessionTest.cs
index 1d65e194bb..59e043247d 100644
--- a/tests/monotouch-test/MultipeerConnectivity/SessionTest.cs
+++ b/tests/monotouch-test/MultipeerConnectivity/SessionTest.cs
@@ -10,7 +10,6 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
@@ -18,26 +17,10 @@ using UIKit;
using MultipeerConnectivity;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.MultipeerConnectivity;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using MonoTouchFixtures.Security;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
namespace MonoTouchFixtures.MultipeerConnectivity {
[TestFixture]
diff --git a/tests/monotouch-test/NativeTypesTest.cs b/tests/monotouch-test/NativeTypesTest.cs
index c4b7992a96..fe25e6a43b 100644
--- a/tests/monotouch-test/NativeTypesTest.cs
+++ b/tests/monotouch-test/NativeTypesTest.cs
@@ -7,8 +7,6 @@
// Copyright 2014 Xamarin Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using System.Globalization;
@@ -150,4 +148,3 @@ namespace MonoTouchFixtures.System {
}
}
}
-#endif
diff --git a/tests/monotouch-test/Network/NWBrowserDescriptorTest.cs b/tests/monotouch-test/Network/NWBrowserDescriptorTest.cs
index 7c2a8a69c9..c8d97a9a3d 100644
--- a/tests/monotouch-test/Network/NWBrowserDescriptorTest.cs
+++ b/tests/monotouch-test/Network/NWBrowserDescriptorTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWBrowserTest.cs b/tests/monotouch-test/Network/NWBrowserTest.cs
index 9b87206898..d94ac1226a 100644
--- a/tests/monotouch-test/Network/NWBrowserTest.cs
+++ b/tests/monotouch-test/Network/NWBrowserTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWConnectionTest.cs b/tests/monotouch-test/Network/NWConnectionTest.cs
index 96ea5d84c1..f3ba981716 100644
--- a/tests/monotouch-test/Network/NWConnectionTest.cs
+++ b/tests/monotouch-test/Network/NWConnectionTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Network/NWEstablishmentReportTest.cs b/tests/monotouch-test/Network/NWEstablishmentReportTest.cs
index adbdaf74f0..e27f6e8d04 100644
--- a/tests/monotouch-test/Network/NWEstablishmentReportTest.cs
+++ b/tests/monotouch-test/Network/NWEstablishmentReportTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Network/NWFramerMessageTest.cs b/tests/monotouch-test/Network/NWFramerMessageTest.cs
index 71bbc7f3b8..b03e854a9f 100644
--- a/tests/monotouch-test/Network/NWFramerMessageTest.cs
+++ b/tests/monotouch-test/Network/NWFramerMessageTest.cs
@@ -3,18 +3,11 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Text;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWListenerTest.cs b/tests/monotouch-test/Network/NWListenerTest.cs
index c3e1690af9..06c1255c95 100644
--- a/tests/monotouch-test/Network/NWListenerTest.cs
+++ b/tests/monotouch-test/Network/NWListenerTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWParametersTest.cs b/tests/monotouch-test/Network/NWParametersTest.cs
index ee9a0e9e2d..675199f5cf 100644
--- a/tests/monotouch-test/Network/NWParametersTest.cs
+++ b/tests/monotouch-test/Network/NWParametersTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Network/NWPathTest.cs b/tests/monotouch-test/Network/NWPathTest.cs
index c83d15f183..d34ff7dfcb 100644
--- a/tests/monotouch-test/Network/NWPathTest.cs
+++ b/tests/monotouch-test/Network/NWPathTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Network/NWProtocolDefinitionTest.cs b/tests/monotouch-test/Network/NWProtocolDefinitionTest.cs
index a43e310927..5081d2f1bd 100644
--- a/tests/monotouch-test/Network/NWProtocolDefinitionTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolDefinitionTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWProtocolIPOptionsTest.cs b/tests/monotouch-test/Network/NWProtocolIPOptionsTest.cs
index c3cfa49b3b..acaeae0e84 100644
--- a/tests/monotouch-test/Network/NWProtocolIPOptionsTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolIPOptionsTest.cs
@@ -1,16 +1,10 @@
#if !__WATCHOS__
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using Network;
using ObjCRuntime;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
using MonoTests.System.Net.Http;
diff --git a/tests/monotouch-test/Network/NWProtocolOptionsTest.cs b/tests/monotouch-test/Network/NWProtocolOptionsTest.cs
index 043aed6688..cd55c3874c 100644
--- a/tests/monotouch-test/Network/NWProtocolOptionsTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolOptionsTest.cs
@@ -1,14 +1,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using Network;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-#endif
-
using NUnit.Framework;
namespace MonoTouchFixtures.Network {
diff --git a/tests/monotouch-test/Network/NWProtocolStackTest.cs b/tests/monotouch-test/Network/NWProtocolStackTest.cs
index 426199708e..3eb8400708 100644
--- a/tests/monotouch-test/Network/NWProtocolStackTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolStackTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWProtocolTcpOptionsTest.cs b/tests/monotouch-test/Network/NWProtocolTcpOptionsTest.cs
index 09f8845c10..f105d6df67 100644
--- a/tests/monotouch-test/Network/NWProtocolTcpOptionsTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolTcpOptionsTest.cs
@@ -1,16 +1,10 @@
#if !__WATCHOS__
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using Network;
using ObjCRuntime;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWProtocolTlsOptionsTest.cs b/tests/monotouch-test/Network/NWProtocolTlsOptionsTest.cs
index 5afcab469c..cb9d52ec77 100644
--- a/tests/monotouch-test/Network/NWProtocolTlsOptionsTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolTlsOptionsTest.cs
@@ -1,16 +1,10 @@
#if !__WATCHOS__
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using Network;
using ObjCRuntime;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWProtocolUdpOptionsTest.cs b/tests/monotouch-test/Network/NWProtocolUdpOptionsTest.cs
index b86fab7180..28f31e737b 100644
--- a/tests/monotouch-test/Network/NWProtocolUdpOptionsTest.cs
+++ b/tests/monotouch-test/Network/NWProtocolUdpOptionsTest.cs
@@ -1,16 +1,10 @@
#if !__WATCHOS__
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using Network;
using ObjCRuntime;
using CoreFoundation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWTxtRecordTest.cs b/tests/monotouch-test/Network/NWTxtRecordTest.cs
index ed67b85ad8..2e253a902a 100644
--- a/tests/monotouch-test/Network/NWTxtRecordTest.cs
+++ b/tests/monotouch-test/Network/NWTxtRecordTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWWebSocketMetadataTest.cs b/tests/monotouch-test/Network/NWWebSocketMetadataTest.cs
index c0254b02db..eb92626329 100644
--- a/tests/monotouch-test/Network/NWWebSocketMetadataTest.cs
+++ b/tests/monotouch-test/Network/NWWebSocketMetadataTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/Network/NWWebSocketOptionsTest.cs b/tests/monotouch-test/Network/NWWebSocketOptionsTest.cs
index 3b95a4be4d..a838f26740 100644
--- a/tests/monotouch-test/Network/NWWebSocketOptionsTest.cs
+++ b/tests/monotouch-test/Network/NWWebSocketOptionsTest.cs
@@ -2,18 +2,11 @@
using System;
using System.Collections.Generic;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using Network;
using ObjCRuntime;
using Security;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.Network;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/NetworkExtension/OnDemandTest.cs b/tests/monotouch-test/NetworkExtension/OnDemandTest.cs
index c3d88b1a91..ac4452d16d 100644
--- a/tests/monotouch-test/NetworkExtension/OnDemandTest.cs
+++ b/tests/monotouch-test/NetworkExtension/OnDemandTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using NetworkExtension;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.NetworkExtension;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.NetworkExtension {
diff --git a/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs b/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs
index 1c29a489e0..d2add826c6 100644
--- a/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs
+++ b/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__ && !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using NetworkExtension;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.NetworkExtension;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.NetworkExtension {
diff --git a/tests/monotouch-test/ObjCRuntime/BlocksTest.cs b/tests/monotouch-test/ObjCRuntime/BlocksTest.cs
index 4b24dfc307..e6b46db1f7 100644
--- a/tests/monotouch-test/ObjCRuntime/BlocksTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/BlocksTest.cs
@@ -12,14 +12,8 @@ using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ObjCRuntime {
diff --git a/tests/monotouch-test/ObjCRuntime/CategoryTest.cs b/tests/monotouch-test/ObjCRuntime/CategoryTest.cs
index 60ed018146..984bcd3488 100644
--- a/tests/monotouch-test/ObjCRuntime/CategoryTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/CategoryTest.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
@@ -22,34 +21,13 @@ using CoreAnimation;
using CoreGraphics;
using CoreLocation;
using PlatformException = ObjCRuntime.RuntimeException;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#if !__TVOS__
-using MonoTouch.MapKit;
-#endif
-using MonoTouch.CoreAnimation;
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreLocation;
-using MonoTouch.UIKit;
-using MonoTouchException=MonoTouch.RuntimeException;
-using NativeException=MonoTouch.Foundation.MonoTouchException;
-#endif
using OpenTK;
using NUnit.Framework;
-#if XAMCORE_2_0
using RectangleF=CoreGraphics.CGRect;
using SizeF=CoreGraphics.CGSize;
using PointF=CoreGraphics.CGPoint;
using CatAttrib=ObjCRuntime.CategoryAttribute;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-using CatAttrib=MonoTouch.ObjCRuntime.CategoryAttribute;
-#endif
namespace MonoTouchFixtures {
[CatAttrib (typeof (NSString))]
diff --git a/tests/monotouch-test/ObjCRuntime/ClassTest.classlist.cs b/tests/monotouch-test/ObjCRuntime/ClassTest.classlist.cs
index 5a3ac604c6..0572192ba5 100644
--- a/tests/monotouch-test/ObjCRuntime/ClassTest.classlist.cs
+++ b/tests/monotouch-test/ObjCRuntime/ClassTest.classlist.cs
@@ -1,8 +1,4 @@
-#if XAMCORE_2_0
-using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
+using Foundation;
class BUG33981_0 : NSObject {}
class BUG33981_1 : NSObject {}
diff --git a/tests/monotouch-test/ObjCRuntime/ClassTest.cs b/tests/monotouch-test/ObjCRuntime/ClassTest.cs
index 5b0ddb1f6b..5c7bc0f047 100644
--- a/tests/monotouch-test/ObjCRuntime/ClassTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/ClassTest.cs
@@ -13,13 +13,8 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ObjCRuntime {
diff --git a/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs b/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs
index 1e1ba1a497..08a1e9d73b 100644
--- a/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs
@@ -8,14 +8,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.ObjCRuntime {
diff --git a/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs b/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs
index c0b5f4d35f..6adeecf4d9 100644
--- a/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs
@@ -4,19 +4,12 @@ using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
using Bindings.Test;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/ObjCRuntime/Messaging.cs b/tests/monotouch-test/ObjCRuntime/Messaging.cs
index 34f52927d3..3725ebdf54 100644
--- a/tests/monotouch-test/ObjCRuntime/Messaging.cs
+++ b/tests/monotouch-test/ObjCRuntime/Messaging.cs
@@ -2,36 +2,17 @@
using System.Runtime.InteropServices;
using System.Drawing;
-#if XAMCORE_2_0
#if !__WATCHOS__
using CoreAnimation;
#endif
#if !__TVOS__
using MapKit;
#endif
+using CoreGraphics;
using Foundation;
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.MapKit;
-using MonoTouch.Foundation;
-#endif
using OpenTK;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
-#if XAMCORE_2_0
namespace ObjCRuntime
-#else
-namespace MonoTouch.ObjCRuntime
-#endif
{
public static class Messaging
{
@@ -43,7 +24,7 @@ namespace MonoTouch.ObjCRuntime
}
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static void void_objc_msgSend_IntPtr_PointF_ref_PointF (IntPtr receiver, IntPtr selector, IntPtr scrollView, PointF velocity, ref PointF targetContentOffset);
+ public extern static void void_objc_msgSend_IntPtr_CGPoint_ref_CGPoint (IntPtr receiver, IntPtr selector, IntPtr scrollView, CGPoint velocity, ref CGPoint targetContentOffset);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSendSuper")]
public extern static void void_objc_msgSendSuper (ref objc_super receiver, IntPtr selector);
@@ -145,48 +126,48 @@ namespace MonoTouch.ObjCRuntime
public extern static bool bool_objc_msgSend_IntPtr_int (IntPtr receiver, IntPtr selector, IntPtr p1, int p2);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static IntPtr IntPtr_objc_msgSend_SizeF (IntPtr receiver, IntPtr selector, SizeF p1);
+ public extern static IntPtr IntPtr_objc_msgSend_CGSize (IntPtr receiver, IntPtr selector, CGSize p1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static PointF PointF_objc_msgSend (IntPtr receiver, IntPtr selector);
+ public extern static CGPoint CGPoint_objc_msgSend (IntPtr receiver, IntPtr selector);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static SizeF SizeF_objc_msgSend (IntPtr receiver, IntPtr selector);
+ public extern static CGSize CGSize_objc_msgSend (IntPtr receiver, IntPtr selector);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static void void_objc_msgSend_RectangleF (IntPtr receiver, IntPtr selector, RectangleF p1);
+ public extern static void void_objc_msgSend_CGRect (IntPtr receiver, IntPtr selector, CGRect p1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend (IntPtr receiver, IntPtr selector);
+ public extern static CGRect CGRect_objc_msgSend (IntPtr receiver, IntPtr selector);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_int (IntPtr receiver, IntPtr selector, int p1);
+ public extern static CGRect CGRect_objc_msgSend_int (IntPtr receiver, IntPtr selector, int p1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_IntPtr (IntPtr receiver, IntPtr selector, IntPtr p1);
+ public extern static CGRect CGRect_objc_msgSend_IntPtr (IntPtr receiver, IntPtr selector, IntPtr p1);
#if !__TVOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_MKCoordinateRegion_IntPtr (IntPtr receiver, IntPtr selector, MKCoordinateRegion p1, IntPtr p2);
+ public extern static CGRect CGRect_objc_msgSend_MKCoordinateRegion_IntPtr (IntPtr receiver, IntPtr selector, MKCoordinateRegion p1, IntPtr p2);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_MKMapRect (IntPtr receiver, IntPtr selector, MKMapRect p1);
+ public extern static CGRect CGRect_objc_msgSend_MKMapRect (IntPtr receiver, IntPtr selector, MKMapRect p1);
#endif // !__TVOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_RectangleF (IntPtr receiver, IntPtr selector, RectangleF p1);
+ public extern static CGRect CGRect_objc_msgSend_CGRect (IntPtr receiver, IntPtr selector, CGRect p1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_RectangleF_int (IntPtr receiver, IntPtr selector, RectangleF p1, int p2);
+ public extern static CGRect CGRect_objc_msgSend_CGRect_int (IntPtr receiver, IntPtr selector, CGRect p1, int p2);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_RectangleF_IntPtr (IntPtr receiver, IntPtr selector, RectangleF p1, IntPtr p2);
+ public extern static CGRect CGRect_objc_msgSend_CGRect_IntPtr (IntPtr receiver, IntPtr selector, CGRect p1, IntPtr p2);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_RectangleF_RectangleF_float (IntPtr receiver, IntPtr selector, RectangleF p1, RectangleF p2, float p3);
+ public extern static CGRect CGRect_objc_msgSend_CGRect_CGRect_float (IntPtr receiver, IntPtr selector, CGRect p1, CGRect p2, float p3);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- public extern static RectangleF RectangleF_objc_msgSend_RectangleF_RectangleF_RectangleF (IntPtr receiver, IntPtr selector, RectangleF p1, RectangleF p2, RectangleF p3);
+ public extern static CGRect CGRect_objc_msgSend_CGRect_CGRect_CGRect (IntPtr receiver, IntPtr selector, CGRect p1, CGRect p2, CGRect p3);
#if !__WATCHOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
@@ -198,17 +179,17 @@ namespace MonoTouch.ObjCRuntime
#if !__TVOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_MKMapRect (out RectangleF buf, IntPtr receiver, IntPtr selector, MKMapRect p1);
+ public extern static void CGRect_objc_msgSend_stret_MKMapRect (out CGRect buf, IntPtr receiver, IntPtr selector, MKMapRect p1);
#endif // !__TVOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret (out RectangleF buf, IntPtr receiver, IntPtr selector);
+ public extern static void CGRect_objc_msgSend_stret (out CGRect buf, IntPtr receiver, IntPtr selector);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void PointF_objc_msgSend_stret (out PointF buf, IntPtr receiver, IntPtr selector);
+ public extern static void CGPoint_objc_msgSend_stret (out CGPoint buf, IntPtr receiver, IntPtr selector);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void SizeF_objc_msgSend_stret (out SizeF buf, IntPtr receiver, IntPtr selector);
+ public extern static void CGSize_objc_msgSend_stret (out CGSize buf, IntPtr receiver, IntPtr selector);
#if !__WATCHOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
@@ -216,30 +197,30 @@ namespace MonoTouch.ObjCRuntime
#endif // !__WATCHOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_int (out RectangleF buf, IntPtr receiver, IntPtr selector, int p1);
+ public extern static void CGRect_objc_msgSend_stret_int (out CGRect buf, IntPtr receiver, IntPtr selector, int p1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_IntPtr (out RectangleF buf, IntPtr receiver, IntPtr selector, IntPtr p1);
+ public extern static void CGRect_objc_msgSend_stret_IntPtr (out CGRect buf, IntPtr receiver, IntPtr selector, IntPtr p1);
#if !__TVOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_MKCoordinateRegion_IntPtr (out RectangleF buf, IntPtr receiver, IntPtr selector, MKCoordinateRegion p1, IntPtr p2);
+ public extern static void CGRect_objc_msgSend_stret_MKCoordinateRegion_IntPtr (out CGRect buf, IntPtr receiver, IntPtr selector, MKCoordinateRegion p1, IntPtr p2);
#endif // !__TVOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_RectangleF (out RectangleF buf, IntPtr receiver, IntPtr selector, RectangleF p1);
+ public extern static void CGRect_objc_msgSend_stret_CGRect (out CGRect buf, IntPtr receiver, IntPtr selector, CGRect p1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_RectangleF_int (out RectangleF buf, IntPtr receiver, IntPtr selector, RectangleF p1, int p2);
+ public extern static void CGRect_objc_msgSend_stret_CGRect_int (out CGRect buf, IntPtr receiver, IntPtr selector, CGRect p1, int p2);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_RectangleF_IntPtr (out RectangleF buf, IntPtr receiver, IntPtr selector, RectangleF p1, IntPtr p2);
+ public extern static void CGRect_objc_msgSend_stret_CGRect_IntPtr (out CGRect buf, IntPtr receiver, IntPtr selector, CGRect p1, IntPtr p2);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_RectangleF_RectangleF_float (out RectangleF buf, IntPtr receiver, IntPtr selector, RectangleF p1, RectangleF p2, float p3);
+ public extern static void CGRect_objc_msgSend_stret_CGRect_CGRect_float (out CGRect buf, IntPtr receiver, IntPtr selector, CGRect p1, CGRect p2, float p3);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- public extern static void RectangleF_objc_msgSend_stret_RectangleF_RectangleF_RectangleF (out RectangleF buf, IntPtr receiver, IntPtr selector, RectangleF p1, RectangleF p2, RectangleF p3);
+ public extern static void CGRect_objc_msgSend_stret_CGRect_CGRect_CGRect (out CGRect buf, IntPtr receiver, IntPtr selector, CGRect p1, CGRect p2, CGRect p3);
#if !__WATCHOS__
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
diff --git a/tests/monotouch-test/ObjCRuntime/ProtocolTest.cs b/tests/monotouch-test/ObjCRuntime/ProtocolTest.cs
index 6ca2e3a03f..9a4b4e6e85 100644
--- a/tests/monotouch-test/ObjCRuntime/ProtocolTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/ProtocolTest.cs
@@ -7,8 +7,6 @@
// Copyright 2018 Microsoft Inc. All rights reserved.
//
-#if XAMCORE_2_0
-
using System;
using System.Collections.Generic;
using System.Reflection;
@@ -46,5 +44,3 @@ namespace MonoTouchFixtures.ObjCRuntime
}
}
}
-
-#endif // XAMCORE_2_0
diff --git a/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs b/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs
index 3264f8414f..b4d4446c73 100644
--- a/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
-#if XAMCORE_2_0
using CoreFoundation;
using MapKit;
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
@@ -36,35 +35,14 @@ using CoreLocation;
using Contacts;
#endif
using WebKit;
-#else
-using MonoTouch;
-using MonoTouch.AddressBook;
-using MonoTouch.AddressBookUI;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.MapKit;
-using MonoTouch.CoreAnimation;
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreLocation;
-using MonoTouch.UIKit;
-using PlatformException=MonoTouch.RuntimeException;
-using NativeException=MonoTouch.Foundation.MonoTouchException;
-#endif
using OpenTK;
using NUnit.Framework;
using Bindings.Test;
-#if XAMCORE_2_0
using RectangleF = CoreGraphics.CGRect;
using SizeF = CoreGraphics.CGSize;
using PointF = CoreGraphics.CGPoint;
using CategoryAttribute = ObjCRuntime.CategoryAttribute;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-using CategoryAttribute=MonoTouch.ObjCRuntime.CategoryAttribute;
-#endif
using XamarinTests.ObjCRuntime;
@@ -73,13 +51,6 @@ namespace MonoTouchFixtures.ObjCRuntime {
[TestFixture]
[Preserve (AllMembers = true)]
public class RegistrarTest {
-#if !XAMCORE_2_0
- // This should throw an exception at build time (device) or at registration time (startup on simulator).
- // Putting it here for now so I don't forget.
- [Export ()]
- public bool? IsRegistered { get; set; }
-#endif
-
public static Registrars CurrentRegistrar {
get {
return RegistrarSharedTest.CurrentRegistrar;
@@ -272,7 +243,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
var sel = new Selector ("testOutParametersWithStructs:in:out:");
NSError value = new NSError ();
IntPtr ptr;
- SizeF size = new SizeF (1, 2);
+ SizeF size = new CGSize (1, 2);
void_objc_msgSend_SizeF_IntPtr_out_IntPtr (obj.Handle, sel.Handle, size, value.Handle, out ptr);
@@ -618,12 +589,12 @@ namespace MonoTouchFixtures.ObjCRuntime {
[Test]
public void TestGenericUIView ()
{
- using (var iview = new NullableIntView (new RectangleF (0, 0, 100, 100))) {
- using (var strview = new StringView (new RectangleF (0, 0, 100, 100))) {
- Messaging.void_objc_msgSend_RectangleF (iview.Handle, Selector.GetHandle ("drawRect:"), RectangleF.Empty);
+ using (var iview = new NullableIntView (new CGRect (0, 0, 100, 100))) {
+ using (var strview = new StringView (new CGRect (0, 0, 100, 100))) {
+ Messaging.void_objc_msgSend_CGRect (iview.Handle, Selector.GetHandle ("drawRect:"), CGRect.Empty);
Assert.AreEqual (typeof(int?), iview.TypeT, "int?");
Assert.AreEqual ("NullableIntView", iview.TypeName, "int? typename");
- Messaging.void_objc_msgSend_RectangleF (strview.Handle, Selector.GetHandle ("drawRect:"), RectangleF.Empty);
+ Messaging.void_objc_msgSend_CGRect (strview.Handle, Selector.GetHandle ("drawRect:"), CGRect.Empty);
Assert.AreEqual (typeof(string), strview.TypeT, "string");
Assert.AreEqual ("StringView", strview.TypeName, "string typename");
}
@@ -678,8 +649,8 @@ namespace MonoTouchFixtures.ObjCRuntime {
public void TestCGPointParameter ()
{
using (var obj = new RegistrarTestClass ()) {
- var pnt1 = new PointF (123, 456);
- PointF pnt2 = new PointF ();
+ var pnt1 = new CGPoint (123, 456);
+ PointF pnt2 = new CGPoint ();
void_objc_msgSend_CGPoint_ref_CGPoint (obj.Handle, Selector.GetHandle ("testCGPoint:out:"), pnt1, ref pnt2);
Assert.AreEqual (123, pnt2.X, "X");
Assert.AreEqual (456, pnt2.Y, "Y");
@@ -1417,7 +1388,6 @@ namespace MonoTouchFixtures.ObjCRuntime {
#if !__TVOS__ // No MapKit in TVOS
#if !__WATCHOS__ // WatchOS has MapKit, but not MKMapView
-#if XAMCORE_2_0
[Test]
public void TestNativeObjectArray ()
{
@@ -1463,7 +1433,6 @@ namespace MonoTouchFixtures.ObjCRuntime {
this.Annotations = annotations;
}
}
-#endif
#endif // !__WATCHOS__
#endif // !__TVOS__
@@ -2205,9 +2174,9 @@ namespace MonoTouchFixtures.ObjCRuntime {
public void InOutProtocolMethodArgument ()
{
using (var obj = new Scroller ()) {
- var velocity = new PointF (1, 2);
- var targetContentOffset = new PointF (3, 4);
- Messaging.void_objc_msgSend_IntPtr_PointF_ref_PointF (obj.Handle, Selector.GetHandle ("scrollViewWillEndDragging:withVelocity:targetContentOffset:"), IntPtr.Zero, velocity, ref targetContentOffset);
+ var velocity = new CGPoint (1, 2);
+ var targetContentOffset = new CGPoint (3, 4);
+ Messaging.void_objc_msgSend_IntPtr_CGPoint_ref_CGPoint (obj.Handle, Selector.GetHandle ("scrollViewWillEndDragging:withVelocity:targetContentOffset:"), IntPtr.Zero, velocity, ref targetContentOffset);
Console.WriteLine (targetContentOffset);
Assert.AreEqual ("{X=123, Y=345}", targetContentOffset.ToString (), "ref output");
}
@@ -2222,7 +2191,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
{
Assert.AreEqual ("{X=1, Y=2}", velocity.ToString (), "velocity");
Assert.AreEqual ("{X=3, Y=4}", targetContentOffset.ToString (), "targetContentOffset");
- targetContentOffset = new PointF (123, 345);
+ targetContentOffset = new CGPoint (123, 345);
}
}
#endif // !__WATCHOS__
@@ -2250,7 +2219,6 @@ namespace MonoTouchFixtures.ObjCRuntime {
#endif // !__TVOS__
#if !__TVOS__ // No Contacts framework in TVOS
-#if XAMCORE_2_0 // The Contacts framework is Unified only
[Test]
public void GenericAPI ()
{
@@ -2294,7 +2262,6 @@ namespace MonoTouchFixtures.ObjCRuntime {
}
}
}
-#endif // XAMCORE_2_0
#endif // !__TVOS__
[Test]
@@ -2469,17 +2436,6 @@ namespace MonoTouchFixtures.ObjCRuntime {
}
}
-#if !XAMCORE_2_0
- class Bug42454 : NSUrlProtocol
- {
- [Export ("initWithRequest:cachedResponse:client:")]
- public Bug42454 (NSUrlRequest request, NSCachedUrlResponse response, NSUrlProtocolClient client)
- {
- throw new NotImplementedException ();
- }
- }
-#endif
-
#if debug_code
static void DumpClass (Type type)
{
diff --git a/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs b/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs
index e8f33a2d19..30b86c402c 100644
--- a/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs
@@ -6,7 +6,7 @@ using System.Drawing;
using System.Runtime.InteropServices;
using System.Threading;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
#if !__WATCHOS__
@@ -15,24 +15,8 @@ using SpriteKit;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using MonoTests.System.Net.Http;
namespace MonoTouchFixtures.ObjCRuntime {
@@ -126,8 +110,8 @@ namespace MonoTouchFixtures.ObjCRuntime {
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false);
IntPtr class_ptr = Class.GetHandle ("SKPhysicsBody");
- SizeF size = new SizeF (3, 2);
- using (var body = Runtime.GetNSObject (Messaging.IntPtr_objc_msgSend_SizeF (class_ptr, Selector.GetHandle ("bodyWithRectangleOfSize:"), size))) {
+ var size = new CGSize (3, 2);
+ using (var body = Runtime.GetNSObject (Messaging.IntPtr_objc_msgSend_CGSize (class_ptr, Selector.GetHandle ("bodyWithRectangleOfSize:"), size))) {
// This would normally return a PKPhysicsBody which is not a subclass but answers the same selectors
// as a SKPhysicsBody. That's an issue since we can't register PKPhysicsBody (Apple won't like it since
// it's a private type) and the non-generic version of GetNSObject (and bindings) would throw an
diff --git a/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs b/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs
index 6fae88dc49..4ff1e719f5 100644
--- a/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs
+++ b/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs
@@ -2,8 +2,8 @@ using System;
using System.Drawing;
using System.Globalization;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
+using CoreGraphics;
using ObjCRuntime;
#if !__TVOS__
using MapKit;
@@ -15,27 +15,9 @@ using CoreLocation;
#if !__WATCHOS__
using CoreMedia;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.MapKit;
-using MonoTouch.CoreAnimation;
-using MonoTouch.CoreLocation;
-using MonoTouch.CoreMedia;
-#endif
using OpenTK;
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.ObjCRuntime {
[TestFixture]
@@ -167,16 +149,16 @@ namespace MonoTouchFixtures.ObjCRuntime {
extern static void float_objc_msgSend_stret_out_float (out float retval, IntPtr receiver, IntPtr selector, out float arg1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- extern static void PointF_objc_msgSend_stret_out_double (out PointF retval, IntPtr receiver, IntPtr selector, out double arg1);
+ extern static void CGPoint_objc_msgSend_stret_out_double (out CGPoint retval, IntPtr receiver, IntPtr selector, out double arg1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- extern static void PointF_objc_msgSend_stret_out_float (out PointF retval, IntPtr receiver, IntPtr selector, out float arg1);
+ extern static void CGPoint_objc_msgSend_stret_out_float (out CGPoint retval, IntPtr receiver, IntPtr selector, out float arg1);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend_stret")]
- extern static void RectangleF_objc_msgSend_stret_IntPtr_IntPtr_RectangleF (out RectangleF retval, IntPtr receiver, IntPtr selector, IntPtr a, IntPtr b, RectangleF c);
+ extern static void CGRect_objc_msgSend_stret_IntPtr_IntPtr_CGRect (out CGRect retval, IntPtr receiver, IntPtr selector, IntPtr a, IntPtr b, CGRect c);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- extern static RectangleF RectangleF_objc_msgSend_IntPtr_IntPtr_RectangleF (IntPtr receiver, IntPtr selector, IntPtr a, IntPtr b, RectangleF c);
+ extern static CGRect CGRect_objc_msgSend_IntPtr_IntPtr_CGRect (IntPtr receiver, IntPtr selector, IntPtr a, IntPtr b, CGRect c);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
extern static void void_objc_msgSend_out_NSError (IntPtr receiver, IntPtr selector, out IntPtr error, int arg1);
@@ -188,7 +170,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
extern static long long_objc_msgSend_long_long_out_long_out_long (IntPtr receiver, IntPtr selector, long arg1, long arg2, out long arg3, out long arg4);
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
- extern static bool bool_objc_msgSend_out_PointF (IntPtr receiver, IntPtr selector, out PointF point);
+ extern static bool bool_objc_msgSend_out_CGPoint (IntPtr receiver, IntPtr selector, out CGPoint point);
#if !__WATCHOS__
@@ -199,7 +181,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
extern static void CMTimeRange_objc_msgSend (out CMTimeRange retval, IntPtr receiver, IntPtr selector);
#endif // !__WATCHOS__
- void AreAlmostEqual (RectangleF left, RectangleF right, string message)
+ void AreAlmostEqual (CGRect left, CGRect right, string message)
{
var delta = 0.000001f;
Assert.AreEqual (left.X, right.X, delta, message);
@@ -211,7 +193,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
[Test]
public void FloatingPointStretTrampolineTest ()
{
- RectangleF rect, rect2, rect3, rect4;
+ CGRect rect, rect2, rect3, rect4;
#if !__TVOS__
MKCoordinateRegion mkregion;
MKMapRect mkmaprect;
@@ -226,104 +208,104 @@ namespace MonoTouchFixtures.ObjCRuntime {
#endif // !__WATCHOS__
int i;
- rect2 = new RectangleF (1.2f, 2.3f, 3.4f, 4.5f);
+ rect2 = new CGRect (1.2f, 2.3f, 3.4f, 4.5f);
if (IsArm64CallingConvention || IsArmv7k) {
- rect = RectangleF_objc_msgSend_IntPtr_IntPtr_RectangleF (obj.Handle, new Selector ("testRectangleF_string_string_RectangleF:b:c:").Handle, new NSString ("a").Handle, new NSString ("b").Handle, rect2);
+ rect = CGRect_objc_msgSend_IntPtr_IntPtr_CGRect (obj.Handle, new Selector ("testCGRect_string_string_CGRect:b:c:").Handle, new NSString ("a").Handle, new NSString ("b").Handle, rect2);
} else {
- RectangleF_objc_msgSend_stret_IntPtr_IntPtr_RectangleF (out rect, obj.Handle, new Selector ("testRectangleF_string_string_RectangleF:b:c:").Handle, new NSString ("a").Handle, new NSString ("b").Handle, rect2);
+ CGRect_objc_msgSend_stret_IntPtr_IntPtr_CGRect (out rect, obj.Handle, new Selector ("testCGRect_string_string_CGRect:b:c:").Handle, new NSString ("a").Handle, new NSString ("b").Handle, rect2);
}
- Assert.That (rect == new RectangleF (rect2.X * pi, rect2.Y * pi, rect2.Width * pi, rect2.Height * pi), "#testRectangleF_string_string_RectangleF:b:c:");
+ Assert.That (rect == new CGRect (rect2.X * pi, rect2.Y * pi, rect2.Width * pi, rect2.Height * pi), "#testCGRect_string_string_CGRect:b:c:");
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend (obj.Handle, new Selector ("testRectangleF").Handle);
+ rect = Messaging.CGRect_objc_msgSend (obj.Handle, new Selector ("testCGRect").Handle);
} else {
- Messaging.RectangleF_objc_msgSend_stret (out rect, obj.Handle, new Selector ("testRectangleF").Handle);
+ Messaging.CGRect_objc_msgSend_stret (out rect, obj.Handle, new Selector ("testCGRect").Handle);
}
- Assert.That (rect == new RectangleF (1.2f, 2.3f, 3.4f, 4.5f), "#testRectangleF");
+ Assert.That (rect == new CGRect (1.2f, 2.3f, 3.4f, 4.5f), "#testCGRect");
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend (class_ptr, new Selector ("staticTestRectangleF").Handle);
+ rect = Messaging.CGRect_objc_msgSend (class_ptr, new Selector ("staticTestCGRect").Handle);
} else {
- Messaging.RectangleF_objc_msgSend_stret (out rect, class_ptr, new Selector ("staticTestRectangleF").Handle);
+ Messaging.CGRect_objc_msgSend_stret (out rect, class_ptr, new Selector ("staticTestCGRect").Handle);
}
- Assert.That (rect == new RectangleF (1.2f, 2.3f, 3.4f, 4.5f), "#static testRectangleF");
+ Assert.That (rect == new CGRect (1.2f, 2.3f, 3.4f, 4.5f), "#static testCGRect");
i = 152;
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_int (obj.Handle, new Selector ("testRectangleF_int:").Handle, 152);
+ rect = Messaging.CGRect_objc_msgSend_int (obj.Handle, new Selector ("testCGRect_int:").Handle, 152);
} else {
- Messaging.RectangleF_objc_msgSend_stret_int (out rect, obj.Handle, new Selector ("testRectangleF_int:").Handle, 152);
+ Messaging.CGRect_objc_msgSend_stret_int (out rect, obj.Handle, new Selector ("testCGRect_int:").Handle, 152);
}
- Assert.That (rect == new RectangleF (i + .1f, i + .2f, i + .3f, i + .4f), "#ret RectF-int", "#testRectangleF_int:");
+ Assert.That (rect == new CGRect (i + .1f, i + .2f, i + .3f, i + .4f), "#ret RectF-int", "#testCGRect_int:");
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_IntPtr (obj.Handle, new Selector ("testRectangleF_IntPtr:").Handle, tmp_obj.Handle);
+ rect = Messaging.CGRect_objc_msgSend_IntPtr (obj.Handle, new Selector ("testCGRect_IntPtr:").Handle, tmp_obj.Handle);
} else {
- Messaging.RectangleF_objc_msgSend_stret_IntPtr (out rect, obj.Handle, new Selector ("testRectangleF_IntPtr:").Handle, tmp_obj.Handle);
+ Messaging.CGRect_objc_msgSend_stret_IntPtr (out rect, obj.Handle, new Selector ("testCGRect_IntPtr:").Handle, tmp_obj.Handle);
}
- AreAlmostEqual (rect, new RectangleF (pi + 0.4f, pi + 0.3f, pi + 0.2f, pi + 0.1f), "#ret RectF-IntPtr");
+ AreAlmostEqual (rect, new CGRect (pi + 0.4f, pi + 0.3f, pi + 0.2f, pi + 0.1f), "#ret RectF-IntPtr");
#if !__TVOS__
mkregion = new MKCoordinateRegion (new CLLocationCoordinate2D (123.456, 345.678), new MKCoordinateSpan (987.654, 654.321));
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_MKCoordinateRegion_IntPtr (obj.Handle, new Selector ("testRectangleF_MCCoordinateRegion_IntPtr:str:").Handle, mkregion, tmp_obj.Handle);
+ rect = Messaging.CGRect_objc_msgSend_MKCoordinateRegion_IntPtr (obj.Handle, new Selector ("testCGRect_MCCoordinateRegion_IntPtr:str:").Handle, mkregion, tmp_obj.Handle);
} else {
- Messaging.RectangleF_objc_msgSend_stret_MKCoordinateRegion_IntPtr (out rect, obj.Handle, new Selector ("testRectangleF_MCCoordinateRegion_IntPtr:str:").Handle, mkregion, tmp_obj.Handle);
+ Messaging.CGRect_objc_msgSend_stret_MKCoordinateRegion_IntPtr (out rect, obj.Handle, new Selector ("testCGRect_MCCoordinateRegion_IntPtr:str:").Handle, mkregion, tmp_obj.Handle);
}
- Assert.That (rect == new RectangleF (123.456f+pi, 345.678f-pi, 987.654f*pi, 654.321f/pi), "#testRectangleF_MCCoordinateRegion_IntPtr:str:");
+ Assert.That (rect == new CGRect (123.456f+pi, 345.678f-pi, 987.654f*pi, 654.321f/pi), "#testCGRect_MCCoordinateRegion_IntPtr:str:");
mkmaprect = new MKMapRect (111.1, 222.2, 333.3, 444.4);
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_MKMapRect (obj.Handle, new Selector ("testRectangleF_MKMapRect:").Handle, mkmaprect);
+ rect = Messaging.CGRect_objc_msgSend_MKMapRect (obj.Handle, new Selector ("testCGRect_MKMapRect:").Handle, mkmaprect);
} else {
- Messaging.RectangleF_objc_msgSend_stret_MKMapRect (out rect, obj.Handle, new Selector ("testRectangleF_MKMapRect:").Handle, mkmaprect);
+ Messaging.CGRect_objc_msgSend_stret_MKMapRect (out rect, obj.Handle, new Selector ("testCGRect_MKMapRect:").Handle, mkmaprect);
}
- Assert.That (rect == new RectangleF (111.1f, 222.2f, 333.3f, 444.4f), "#testRectangleF_MKMapRect:");
+ Assert.That (rect == new CGRect (111.1f, 222.2f, 333.3f, 444.4f), "#testCGRect_MKMapRect:");
#endif // !__TVOS__
- rect2 = new RectangleF (9.9f, 8.8f, 7.7f, 6.6f);
+ rect2 = new CGRect (9.9f, 8.8f, 7.7f, 6.6f);
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_RectangleF (obj.Handle, new Selector ("testRectangleF_RectangleF:").Handle, rect2);
+ rect = Messaging.CGRect_objc_msgSend_CGRect (obj.Handle, new Selector ("testCGRect_CGRect:").Handle, rect2);
} else {
- Messaging.RectangleF_objc_msgSend_stret_RectangleF (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF:").Handle, rect2);
+ Messaging.CGRect_objc_msgSend_stret_CGRect (out rect, obj.Handle, new Selector ("testCGRect_CGRect:").Handle, rect2);
}
- Assert.That (rect == rect2, "#testRectangleF_RectangleF:");
+ Assert.That (rect == rect2, "#testCGRect_CGRect:");
- rect2 = new RectangleF (5.44f, 4.33f, 3.22f, 2.11f);
+ rect2 = new CGRect (5.44f, 4.33f, 3.22f, 2.11f);
i = 8;
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_RectangleF_int (obj.Handle, new Selector ("testRectangleF_RectangleF_int:i:").Handle, rect2, 8);
+ rect = Messaging.CGRect_objc_msgSend_CGRect_int (obj.Handle, new Selector ("testCGRect_CGRect_int:i:").Handle, rect2, 8);
} else {
- Messaging.RectangleF_objc_msgSend_stret_RectangleF_int (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_int:i:").Handle, rect2, 8);
+ Messaging.CGRect_objc_msgSend_stret_CGRect_int (out rect, obj.Handle, new Selector ("testCGRect_CGRect_int:i:").Handle, rect2, 8);
}
- AreAlmostEqual (rect, new RectangleF (5.44f*i, 4.33f+i, 3.22f-i, 2.11f/i), "testRectangleF_RectangleF_int:i:");
+ AreAlmostEqual (rect, new CGRect (5.44f*i, 4.33f+i, 3.22f-i, 2.11f/i), "testCGRect_CGRect_int:i:");
- rect2 = new RectangleF (5.4f, 4.3f, 3.2f, 2.1f);
+ rect2 = new CGRect (5.4f, 4.3f, 3.2f, 2.1f);
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_RectangleF_IntPtr (obj.Handle, new Selector ("testRectangleF_RectangleF_IntPtr:str:").Handle, rect2, tmp_obj.Handle);
+ rect = Messaging.CGRect_objc_msgSend_CGRect_IntPtr (obj.Handle, new Selector ("testCGRect_CGRect_IntPtr:str:").Handle, rect2, tmp_obj.Handle);
} else {
- Messaging.RectangleF_objc_msgSend_stret_RectangleF_IntPtr (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_IntPtr:str:").Handle, rect2, tmp_obj.Handle);
+ Messaging.CGRect_objc_msgSend_stret_CGRect_IntPtr (out rect, obj.Handle, new Selector ("testCGRect_CGRect_IntPtr:str:").Handle, rect2, tmp_obj.Handle);
}
- Assert.That (rect == new RectangleF (5.4f*pi, 4.3f+pi, 3.2f-pi, 2.1f/pi));
+ Assert.That (rect == new CGRect (5.4f*pi, 4.3f+pi, 3.2f-pi, 2.1f/pi));
- rect2 = new RectangleF (1, 2, 3, 4);
- rect3 = new RectangleF (9, 8, 7, 6);
+ rect2 = new CGRect (1, 2, 3, 4);
+ rect3 = new CGRect (9, 8, 7, 6);
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_RectangleF_RectangleF_float ( obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_float:b:c:").Handle, rect2, rect3, (float) pi);
+ rect = Messaging.CGRect_objc_msgSend_CGRect_CGRect_float ( obj.Handle, new Selector ("testCGRect_CGRect_CGRect_float:b:c:").Handle, rect2, rect3, (float) pi);
} else {
- Messaging.RectangleF_objc_msgSend_stret_RectangleF_RectangleF_float (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_float:b:c:").Handle, rect2, rect3, (float) pi);
+ Messaging.CGRect_objc_msgSend_stret_CGRect_CGRect_float (out rect, obj.Handle, new Selector ("testCGRect_CGRect_CGRect_float:b:c:").Handle, rect2, rect3, (float) pi);
}
- Assert.That (rect == new RectangleF (1 * 9 * pi, 2 * 8 * pi, 3 * 7 * pi, 4 * 6 * pi), "#testRectangleF_RectangleF_RectangleF_float:b:c:");
+ Assert.That (rect == new CGRect (1 * 9 * pi, 2 * 8 * pi, 3 * 7 * pi, 4 * 6 * pi), "#testCGRect_CGRect_CGRect_float:b:c:");
- rect2 = new RectangleF (1, 2, 3, 4);
- rect3 = new RectangleF (9, 8, 7, 6);
- rect4 = new RectangleF (10, 20, 30, 40);
+ rect2 = new CGRect (1, 2, 3, 4);
+ rect3 = new CGRect (9, 8, 7, 6);
+ rect4 = new CGRect (10, 20, 30, 40);
if (IsArm64CallingConvention || IsArmv7k) {
- rect = Messaging.RectangleF_objc_msgSend_RectangleF_RectangleF_RectangleF (obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_RectangleF:b:c:").Handle, rect2, rect3, rect4);
+ rect = Messaging.CGRect_objc_msgSend_CGRect_CGRect_CGRect (obj.Handle, new Selector ("testCGRect_CGRect_CGRect_CGRect:b:c:").Handle, rect2, rect3, rect4);
} else {
- Messaging.RectangleF_objc_msgSend_stret_RectangleF_RectangleF_RectangleF (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_RectangleF:b:c:").Handle, rect2, rect3, rect4);
+ Messaging.CGRect_objc_msgSend_stret_CGRect_CGRect_CGRect (out rect, obj.Handle, new Selector ("testCGRect_CGRect_CGRect_CGRect:b:c:").Handle, rect2, rect3, rect4);
}
- Assert.That (rect == new RectangleF (20, 30, 40, 50), "#testRectangleF_RectangleF_RectangleF_RectangleF:b:c:");
+ Assert.That (rect == new CGRect (20, 30, 40, 50), "#testCGRect_CGRect_CGRect_CGRect:b:c:");
#if !__WATCHOS__
if (IsArm64CallingConvention) {
@@ -353,32 +335,32 @@ namespace MonoTouchFixtures.ObjCRuntime {
Assert.That (catransform3d.Equals (res), "#testCATransform3D");
#endif // !__WATCHOS__
- PointF point;
- SizeF size;
+ CGPoint point;
+ CGSize size;
if (IsArm32) {
- Messaging.PointF_objc_msgSend_stret (out point, obj.Handle, new Selector ("testPointF").Handle);
+ Messaging.CGPoint_objc_msgSend_stret (out point, obj.Handle, new Selector ("testCGPoint").Handle);
} else {
- point = Messaging.PointF_objc_msgSend (obj.Handle, new Selector ("testPointF").Handle);
+ point = Messaging.CGPoint_objc_msgSend (obj.Handle, new Selector ("testCGPoint").Handle);
}
- Assert.That (point == new PointF (pi*2, pi*20), "#testPointF");
+ Assert.That (point == new CGPoint (pi*2, pi*20), "#testCGPoint");
if (IsArm32) {
- Messaging.SizeF_objc_msgSend_stret (out size, obj.Handle, new Selector ("testSizeF").Handle);
+ Messaging.CGSize_objc_msgSend_stret (out size, obj.Handle, new Selector ("testCGSize").Handle);
} else {
- size = Messaging.SizeF_objc_msgSend (obj.Handle, new Selector ("testSizeF").Handle);
+ size = Messaging.CGSize_objc_msgSend (obj.Handle, new Selector ("testCGSize").Handle);
}
- Assert.That (size == new SizeF (pi*3, pi*30), "#testSizeF");
+ Assert.That (size == new CGSize (pi*3, pi*30), "#testCGSize");
}
[Test]
public void OutValueTypeTest ()
{
var obj = new OutParams ();
- PointF point = new PointF (3, 14);
+ CGPoint point = new CGPoint (3, 14);
bool res;
- res = bool_objc_msgSend_out_PointF (obj.Handle, new Selector ("Test_PointF:").Handle, out point);
+ res = bool_objc_msgSend_out_CGPoint (obj.Handle, new Selector ("Test_CGPoint:").Handle, out point);
Assert.That (res, "#res");
Assert.That (point.X, Is.EqualTo ((nfloat) 3.1415f), "#x");
Assert.That (point.Y, Is.EqualTo ((nfloat) 0), "#y");
@@ -519,10 +501,10 @@ namespace MonoTouchFixtures.ObjCRuntime {
throw new ArgumentOutOfRangeException ("arg1");
}
}
- [Export ("Test_PointF:")]
- bool Test_PointF (out PointF point)
+ [Export ("Test_CGPoint:")]
+ bool Test_CGPoint (out CGPoint point)
{
- point = new PointF (3.1415f, 0);
+ point = new CGPoint (3.1415f, 0);
return true;
}
}
@@ -660,94 +642,90 @@ namespace MonoTouchFixtures.ObjCRuntime {
return float.Parse (str, new CultureInfo ("en-US").NumberFormat);
}
- [Export ("testRectangleF")]
- public RectangleF Test_RectangleF ()
+ [Export ("testCGRect")]
+ public CGRect Test_CGRect ()
{
- return new RectangleF (1.2f, 2.3f, 3.4f, 4.5f);
+ return new CGRect (1.2f, 2.3f, 3.4f, 4.5f);
}
- [Export ("staticTestRectangleF")]
- static public RectangleF StaticTest_RectangleF ()
+ [Export ("staticTestCGRect")]
+ static public CGRect StaticTest_CGRect ()
{
- return new RectangleF (1.2f, 2.3f, 3.4f, 4.5f);
+ return new CGRect (1.2f, 2.3f, 3.4f, 4.5f);
}
- [Export ("testRectangleF_int:")]
- public RectangleF Test_RectangleF_int (int a)
+ [Export ("testCGRect_int:")]
+ public CGRect Test_CGRect_int (int a)
{
- return new RectangleF (a + 0.1f, a + 0.2f, a + 0.3f, a + 0.4f);
+ return new CGRect (a + 0.1f, a + 0.2f, a + 0.3f, a + 0.4f);
}
- [Export ("testRectangleF_IntPtr:")]
- public RectangleF Test_RectangleF_IntPtr (NSString str)
+ [Export ("testCGRect_IntPtr:")]
+ public CGRect Test_CGRect_IntPtr (NSString str)
{
float pi = ParseString (str.ToString ());
if ((object) StringObj != (object) str)
- return RectangleF.Empty;
- return new RectangleF (pi + 0.4f, pi + 0.3f, pi + 0.2f, pi + 0.1f);
+ return CGRect.Empty;
+ return new CGRect (pi + 0.4f, pi + 0.3f, pi + 0.2f, pi + 0.1f);
}
#if !__TVOS__
- [Export ("testRectangleF_MCCoordinateRegion_IntPtr:str:")]
- public RectangleF Test_RectangleF_MKCoordinateRegion_IntPtr (MKCoordinateRegion a, NSString str)
+ [Export ("testCGRect_MCCoordinateRegion_IntPtr:str:")]
+ public CGRect Test_CGRect_MKCoordinateRegion_IntPtr (MKCoordinateRegion a, NSString str)
{
float pi = ParseString (str.ToString ());
if ((object) StringObj != (object) str)
- return RectangleF.Empty;
-#if __UNIFIED__
- return new RectangleF ((double)(float)a.Center.Latitude+pi, (double)(float)a.Center.Longitude-pi, (double)(float)a.Span.LatitudeDelta*pi, (double)(float)a.Span.LongitudeDelta/pi);
-#else
- return new RectangleF ((float)a.Center.Latitude+pi, (float)a.Center.Longitude-pi, (float)a.Span.LatitudeDelta*pi, (float)a.Span.LongitudeDelta/pi);
-#endif
+ return CGRect.Empty;
+ return new CGRect ((double)(float)a.Center.Latitude+pi, (double)(float)a.Center.Longitude-pi, (double)(float)a.Span.LatitudeDelta*pi, (double)(float)a.Span.LongitudeDelta/pi);
}
- [Export ("testRectangleF_MKMapRect:")]
- public RectangleF Test_RectangleF_MKMapRect (MKMapRect a)
+ [Export ("testCGRect_MKMapRect:")]
+ public CGRect Test_CGRect_MKMapRect (MKMapRect a)
{
- return new RectangleF ((float) a.Origin.X, (float) a.Origin.Y, (float) a.Width, (float) a.Height);
+ return new CGRect ((float) a.Origin.X, (float) a.Origin.Y, (float) a.Width, (float) a.Height);
}
#endif // !__TVOS__
- [Export ("testRectangleF_RectangleF:")]
- public RectangleF Test_RectangleF_RectangleF (RectangleF a)
+ [Export ("testCGRect_CGRect:")]
+ public CGRect Test_CGRect_CGRect (CGRect a)
{
- return new RectangleF (a.X, a.Y, a.Width, a.Height);
+ return new CGRect (a.X, a.Y, a.Width, a.Height);
}
- [Export ("testRectangleF_RectangleF_int:i:")]
- public RectangleF Test_RectangleF_RectangleF_int (RectangleF a, int i)
+ [Export ("testCGRect_CGRect_int:i:")]
+ public CGRect Test_CGRect_CGRect_int (CGRect a, int i)
{
- return new RectangleF (a.X*i, a.Y+i, a.Width-i, a.Height/i);
+ return new CGRect (a.X*i, a.Y+i, a.Width-i, a.Height/i);
}
- [Export ("testRectangleF_RectangleF_IntPtr:str:")]
- public RectangleF Test_RectangleF_RectangleF_IntPtr (RectangleF a, NSString str)
+ [Export ("testCGRect_CGRect_IntPtr:str:")]
+ public CGRect Test_CGRect_CGRect_IntPtr (CGRect a, NSString str)
{
float pi = ParseString (str.ToString ());
if ((object) StringObj != (object) str)
- return RectangleF.Empty;
- return new RectangleF (a.X*pi, a.Y+pi, a.Width-pi, a.Height/pi);
+ return CGRect.Empty;
+ return new CGRect (a.X*pi, a.Y+pi, a.Width-pi, a.Height/pi);
}
- [Export ("testRectangleF_RectangleF_RectangleF_float:b:c:")]
- public RectangleF Test_RectangleF_RectangleF_RectangleF_float (RectangleF a, RectangleF b, float c)
+ [Export ("testCGRect_CGRect_CGRect_float:b:c:")]
+ public CGRect Test_CGRect_CGRect_CGRect_float (CGRect a, CGRect b, float c)
{
- return new RectangleF (a.X*b.X*c, a.Y*b.Y*c, a.Width*b.Width*c, a.Height*b.Height*c);
+ return new CGRect (a.X*b.X*c, a.Y*b.Y*c, a.Width*b.Width*c, a.Height*b.Height*c);
}
- [Export ("testRectangleF_RectangleF_RectangleF_RectangleF:b:c:")]
- public RectangleF Test_RectangleF_RectangleF_RectangleF_RectangleF (RectangleF a, RectangleF b, RectangleF c)
+ [Export ("testCGRect_CGRect_CGRect_CGRect:b:c:")]
+ public CGRect Test_CGRect_CGRect_CGRect_CGRect (CGRect a, CGRect b, CGRect c)
{
- return new RectangleF (a.X+b.X+c.X, a.Y+b.Y+c.Y, a.Width+b.Width+c.Width, a.Height+b.Height+c.Height);
+ return new CGRect (a.X+b.X+c.X, a.Y+b.Y+c.Y, a.Width+b.Width+c.Width, a.Height+b.Height+c.Height);
}
- [Export ("testRectangleF_string_string_RectangleF:b:c:")]
- public RectangleF Test_RectangleF_string_string_RectangleF (NSString a, NSString b, RectangleF c)
+ [Export ("testCGRect_string_string_CGRect:b:c:")]
+ public CGRect Test_CGRect_string_string_CGRect (NSString a, NSString b, CGRect c)
{
Assert.That (Is.Equals (a.ToString (), "a"), "#a");
Assert.That (Is.Equals (b.ToString (), "b"), "#b");
- return new RectangleF (c.X * pi, c.Y * pi, c.Width * pi, c.Height * pi);
+ return new CGRect (c.X * pi, c.Y * pi, c.Width * pi, c.Height * pi);
}
#if !__WATCHOS__
@@ -775,30 +753,30 @@ namespace MonoTouchFixtures.ObjCRuntime {
}
#endif // !__WATCHOS__
- [Export ("testPointF")]
- public PointF Test_PointF ()
+ [Export ("testCGPoint")]
+ public CGPoint Test_CGPoint ()
{
- return new PointF (pi*2, pi*20);
+ return new CGPoint (pi*2, pi*20);
}
- [Export ("testSizeF")]
- public SizeF Test_SizeF ()
+ [Export ("testCGSize")]
+ public CGSize Test_CGSize ()
{
- return new SizeF (pi*3, pi*30);
+ return new CGSize (pi*3, pi*30);
}
- [Export ("Test_PointF_out_Double:")]
- PointF Test_PointF_out_Double (out double foo)
+ [Export ("Test_CGPoint_out_Double:")]
+ CGPoint Test_CGPoint_out_Double (out double foo)
{
foo = 3.18f;
- return new PointF (1, 2);
+ return new CGPoint (1, 2);
}
- [Export ("Test_StaticPointF_out_Float:")]
- static PointF Test_StaticPointF_out_Float (out float foo)
+ [Export ("Test_StaticCGPoint_out_Float:")]
+ static CGPoint Test_StaticCGPoint_out_Float (out float foo)
{
foo = 3.20f;
- return new PointF (10, 20);
+ return new CGPoint (10, 20);
}
}
}
diff --git a/tests/monotouch-test/OpenGLES/EAGLContext.cs b/tests/monotouch-test/OpenGLES/EAGLContext.cs
index 988cb5d31f..056e750236 100644
--- a/tests/monotouch-test/OpenGLES/EAGLContext.cs
+++ b/tests/monotouch-test/OpenGLES/EAGLContext.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using OpenGLES;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.OpenGLES;
-#endif
using OpenTK.Graphics.ES20;
using NUnit.Framework;
diff --git a/tests/monotouch-test/PassKit/AddPassesViewControllerTest.cs b/tests/monotouch-test/PassKit/AddPassesViewControllerTest.cs
index 450153f941..041a431a17 100644
--- a/tests/monotouch-test/PassKit/AddPassesViewControllerTest.cs
+++ b/tests/monotouch-test/PassKit/AddPassesViewControllerTest.cs
@@ -10,16 +10,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using PassKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.PassKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PassKit {
diff --git a/tests/monotouch-test/PassKit/LabeledValueTest.cs b/tests/monotouch-test/PassKit/LabeledValueTest.cs
index 0011553712..1a20ddb78b 100644
--- a/tests/monotouch-test/PassKit/LabeledValueTest.cs
+++ b/tests/monotouch-test/PassKit/LabeledValueTest.cs
@@ -1,13 +1,8 @@
#if __IOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using PassKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.PassKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PassKit {
diff --git a/tests/monotouch-test/PassKit/ObjectTest.cs b/tests/monotouch-test/PassKit/ObjectTest.cs
index 12390d5820..70ca67d5c5 100644
--- a/tests/monotouch-test/PassKit/ObjectTest.cs
+++ b/tests/monotouch-test/PassKit/ObjectTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using PassKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.PassKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PassKit {
diff --git a/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs b/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs
index 84d2395a6c..69c74a2e4a 100644
--- a/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs
+++ b/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs
@@ -1,15 +1,9 @@
#if !__TVOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using PassKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.PassKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PassKit {
diff --git a/tests/monotouch-test/PassKit/PassLibraryTest.cs b/tests/monotouch-test/PassKit/PassLibraryTest.cs
index e9ca40fb47..9c72a763a8 100644
--- a/tests/monotouch-test/PassKit/PassLibraryTest.cs
+++ b/tests/monotouch-test/PassKit/PassLibraryTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using PassKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.PassKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PassKit {
diff --git a/tests/monotouch-test/PassKit/PassTest.cs b/tests/monotouch-test/PassKit/PassTest.cs
index 7308a63849..892b477e97 100644
--- a/tests/monotouch-test/PassKit/PassTest.cs
+++ b/tests/monotouch-test/PassKit/PassTest.cs
@@ -10,15 +10,9 @@
#if !__TVOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using PassKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.PassKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PassKit {
diff --git a/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs b/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs
index 23fbb04c07..9a7dbbb378 100644
--- a/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs
+++ b/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs
@@ -7,7 +7,7 @@
// Copyright 2017 Microsoft Inc.
//
-#if (__IOS__ || MONOMAC) && XAMCORE_2_0
+#if __IOS__ || MONOMAC
using System;
@@ -58,4 +58,4 @@ namespace MonoTouchFixtures.PdfKit
}
}
-#endif // !__WATCHOS__
+#endif // __IOS__ || MONOMAC
diff --git a/tests/monotouch-test/Photos/FetchResultTest.cs b/tests/monotouch-test/Photos/FetchResultTest.cs
index df9b45120b..cf785553d6 100644
--- a/tests/monotouch-test/Photos/FetchResultTest.cs
+++ b/tests/monotouch-test/Photos/FetchResultTest.cs
@@ -11,27 +11,12 @@
using System;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
using Photos;
using CoreGraphics;
using AssetsLibrary;
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouch.Photos;
-using System.Drawing;
-using MonoTouch.AssetsLibrary;
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Photos {
@@ -114,19 +99,19 @@ namespace MonoTouchFixtures.Photos {
context.RotateCTM (90.0f * (nfloat)Math.PI / 180.0f);
var polygonPath = new UIBezierPath();
- polygonPath.MoveTo (new PointF (0.0f, -250.0f));
- polygonPath.AddLineTo (new PointF (216.51f, -125.0f));
- polygonPath.AddLineTo (new PointF (216.51f, 125.0f));
- polygonPath.AddLineTo (new PointF (0.0f, 250.0f));
- polygonPath.AddLineTo (new PointF (-216.51f, 125.0f));
- polygonPath.AddLineTo (new PointF (-216.51f, -125.0f));
+ polygonPath.MoveTo (new CGPoint (0.0f, -250.0f));
+ polygonPath.AddLineTo (new CGPoint (216.51f, -125.0f));
+ polygonPath.AddLineTo (new CGPoint (216.51f, 125.0f));
+ polygonPath.AddLineTo (new CGPoint (0.0f, 250.0f));
+ polygonPath.AddLineTo (new CGPoint (-216.51f, 125.0f));
+ polygonPath.AddLineTo (new CGPoint (-216.51f, -125.0f));
polygonPath.ClosePath ();
color.SetFill ();
polygonPath.Fill ();
context.RestoreState();
- var textRect = new RectangleF (0.0f, 0.0f, 512.0f, 512.0f);
+ var textRect = new CGRect (0.0f, 0.0f, 512.0f, 512.0f);
var textContent = "X";
UIColor.White.SetFill ();
var textFont = UIFont.FromName ("Helvetica", 350.0f);
@@ -141,7 +126,7 @@ namespace MonoTouchFixtures.Photos {
if (imageOfXamagram != null)
return imageOfXamagram;
- UIGraphics.BeginImageContextWithOptions (new SizeF (512.0f, 512.0f), false, 0);
+ UIGraphics.BeginImageContextWithOptions (new CGSize (512.0f, 512.0f), false, 0);
DrawXamagram ();
imageOfXamagram = UIGraphics.GetImageFromCurrentImageContext ();
UIGraphics.EndImageContext ();
diff --git a/tests/monotouch-test/Photos/LivePhotoEditingContextTest.cs b/tests/monotouch-test/Photos/LivePhotoEditingContextTest.cs
index 0bdebae0a7..965dc90a84 100644
--- a/tests/monotouch-test/Photos/LivePhotoEditingContextTest.cs
+++ b/tests/monotouch-test/Photos/LivePhotoEditingContextTest.cs
@@ -2,25 +2,11 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
using Photos;
using CoreGraphics;
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouch.Photos;
-using System.Drawing;
-using MonoTouch.AssetsLibrary;
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Photos {
diff --git a/tests/monotouch-test/PushKit/PushRegistryTest.cs b/tests/monotouch-test/PushKit/PushRegistryTest.cs
index c07291e12f..7e654a518f 100644
--- a/tests/monotouch-test/PushKit/PushRegistryTest.cs
+++ b/tests/monotouch-test/PushKit/PushRegistryTest.cs
@@ -3,18 +3,11 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using CoreFoundation;
using Foundation;
using PushKit;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.CoreFoundation;
-using MonoTouch.Foundation;
-using MonoTouch.PushKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.PushKit {
diff --git a/tests/monotouch-test/QuickLook/PreviewControllerTest.cs b/tests/monotouch-test/QuickLook/PreviewControllerTest.cs
index 98796fe32e..0634d432d6 100644
--- a/tests/monotouch-test/QuickLook/PreviewControllerTest.cs
+++ b/tests/monotouch-test/QuickLook/PreviewControllerTest.cs
@@ -11,28 +11,13 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using QuickLook;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.QuickLook;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.QuickLook {
[TestFixture]
@@ -66,15 +51,11 @@ namespace MonoTouchFixtures.QuickLook {
public void DelegateEvents ()
{
using (QLPreviewController pc = new QLPreviewController ()) {
-#if XAMCORE_2_0
- pc.ShouldOpenUrl += delegate (QLPreviewController controller, NSUrl url, IQLPreviewItem item) {
-#else
- pc.ShouldOpenUrl += delegate (QLPreviewController controller, NSUrl url, QLPreviewItem item) {
-#endif
+ pc.ShouldOpenUrl += delegate (QLPreviewController controller, NSUrl url, IQLPreviewItem item) {
return false;
};
pc.FrameForPreviewItem += delegate {
- return new RectangleF (1, 2, 3, 4);
+ return new CGRect (1, 2, 3, 4);
};
pc.TransitionImageForPreviewItem += delegate {
return new UIImage ();
diff --git a/tests/monotouch-test/SafariServices/ReadingListTest.cs b/tests/monotouch-test/SafariServices/ReadingListTest.cs
index 88c4fbb001..90442a61f3 100644
--- a/tests/monotouch-test/SafariServices/ReadingListTest.cs
+++ b/tests/monotouch-test/SafariServices/ReadingListTest.cs
@@ -11,28 +11,12 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using SafariServices;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SafariServices;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SafariServices {
[TestFixture]
diff --git a/tests/monotouch-test/SceneKit/GeometrySourceTest.cs b/tests/monotouch-test/SceneKit/GeometrySourceTest.cs
index f2837da366..69cb42a1cc 100644
--- a/tests/monotouch-test/SceneKit/GeometrySourceTest.cs
+++ b/tests/monotouch-test/SceneKit/GeometrySourceTest.cs
@@ -3,7 +3,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using Metal;
using ObjCRuntime;
@@ -13,25 +12,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Metal;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SceneKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SceneKit {
[TestFixture]
diff --git a/tests/monotouch-test/SceneKit/NodeTest.cs b/tests/monotouch-test/SceneKit/NodeTest.cs
index b40372e50b..c789b15241 100644
--- a/tests/monotouch-test/SceneKit/NodeTest.cs
+++ b/tests/monotouch-test/SceneKit/NodeTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreAnimation;
using Foundation;
using SceneKit;
@@ -20,24 +19,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-using MonoTouch.SceneKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SceneKit {
[TestFixture]
diff --git a/tests/monotouch-test/SceneKit/SCNViewTests.cs b/tests/monotouch-test/SceneKit/SCNViewTests.cs
index 827c6b9f05..db3b7e76bb 100644
--- a/tests/monotouch-test/SceneKit/SCNViewTests.cs
+++ b/tests/monotouch-test/SceneKit/SCNViewTests.cs
@@ -12,15 +12,9 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using SceneKit;
using CoreGraphics;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SceneKit;
-using CGRect = System.Drawing.RectangleF;
-#endif
namespace MonoTouchFixtures.SceneKit {
diff --git a/tests/monotouch-test/SceneKit/StructTest.cs b/tests/monotouch-test/SceneKit/StructTest.cs
index 8415b960fe..d41307893f 100644
--- a/tests/monotouch-test/SceneKit/StructTest.cs
+++ b/tests/monotouch-test/SceneKit/StructTest.cs
@@ -10,7 +10,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using CoreAnimation;
using Foundation;
using SceneKit;
@@ -19,24 +18,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.CoreAnimation;
-using MonoTouch.Foundation;
-using MonoTouch.SceneKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SceneKit {
[TestFixture]
@@ -47,13 +30,7 @@ namespace MonoTouchFixtures.SceneKit {
public void Matrix ()
{
var id = SCNMatrix4.Identity;
-#if !XAMCORE_2_0
- var m = new SCNMatrix4 ();
- // that was possible in classic - but will now trigger a CS0198
- SCNMatrix4.Identity = m;
-#else
id.M11 = 2;
-#endif
Assert.That (SCNMatrix4.Identity, Is.Not.EqualTo (id), "Identity");
}
@@ -61,13 +38,7 @@ namespace MonoTouchFixtures.SceneKit {
public void Quaternion ()
{
var id = SCNQuaternion.Identity;
-#if !XAMCORE_2_0
- var q = new SCNQuaternion ();
- // that was possible in classic - but will now trigger a CS0198
- SCNQuaternion.Identity = q;
-#else
id.W = 2;
-#endif
Assert.That (SCNQuaternion.Identity, Is.Not.EqualTo (id), "Identity");
}
@@ -76,50 +47,24 @@ namespace MonoTouchFixtures.SceneKit {
{
var v = new SCNVector4 ();
var u = SCNVector4.UnitX;
-#if !XAMCORE_2_0
- // that was possible in classic - but will now trigger a CS0198
- SCNVector4.UnitX = v;
-#else
u.X = 2;
-#endif
Assert.That (SCNVector4.UnitX, Is.Not.EqualTo (u), "UnitX");
u = SCNVector4.UnitY;
-#if !XAMCORE_2_0
- // that was possible in classic - but will now trigger a CS0198
- SCNVector4.UnitY = v;
-#else
u.Y = 2;
-#endif
Assert.That (SCNVector4.UnitY, Is.Not.EqualTo (u), "UnitY");
u = SCNVector4.UnitZ;
-#if !XAMCORE_2_0
- // that was possible in classic - but will now trigger a CS0198
- SCNVector4.UnitZ = v;
-#else
u.Z = 2;
-#endif
Assert.That (SCNVector4.UnitZ, Is.Not.EqualTo (u), "UnitZ");
u = SCNVector4.UnitW;
-#if !XAMCORE_2_0
- // that was possible in classic - but will now trigger a CS0198
- SCNVector4.UnitW = v;
-#else
u.W = 2;
-#endif
Assert.That (SCNVector4.UnitW, Is.Not.EqualTo (u), "UnitW");
u = SCNVector4.Zero;
-#if !XAMCORE_2_0
- // that was possible in classic - but will now trigger a CS0198
- SCNVector4.Zero = v;
- Assert.That (SCNVector4.Zero, Is.EqualTo (u), "Zero");
-#else
u.W = 2;
Assert.That (SCNVector4.Zero, Is.Not.EqualTo (u), "Zero");
-#endif
}
}
}
diff --git a/tests/monotouch-test/Security/CertificateTest.cs b/tests/monotouch-test/Security/CertificateTest.cs
index a95e42cdf4..25f9e1e0bc 100644
--- a/tests/monotouch-test/Security/CertificateTest.cs
+++ b/tests/monotouch-test/Security/CertificateTest.cs
@@ -11,27 +11,11 @@ using System;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
-#if XAMCORE_2_0
using Foundation;
using Security;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Security {
[TestFixture]
diff --git a/tests/monotouch-test/Security/IdentityTest.cs b/tests/monotouch-test/Security/IdentityTest.cs
index 43e338a7b7..0f2c32aca0 100644
--- a/tests/monotouch-test/Security/IdentityTest.cs
+++ b/tests/monotouch-test/Security/IdentityTest.cs
@@ -9,13 +9,8 @@
//
using System;
-#if XAMCORE_2_0
using Foundation;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Security {
diff --git a/tests/monotouch-test/Security/ImportExportTest.cs b/tests/monotouch-test/Security/ImportExportTest.cs
index b8b0aad1ff..9ed3a956ea 100644
--- a/tests/monotouch-test/Security/ImportExportTest.cs
+++ b/tests/monotouch-test/Security/ImportExportTest.cs
@@ -1,25 +1,10 @@
// Copyright 2011 Xamarin Inc. All rights reserved
using System;
-#if XAMCORE_2_0
using Foundation;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Security {
[TestFixture]
diff --git a/tests/monotouch-test/Security/KeyChainTest.cs b/tests/monotouch-test/Security/KeyChainTest.cs
index 7fd09da6ab..223d7ecc34 100644
--- a/tests/monotouch-test/Security/KeyChainTest.cs
+++ b/tests/monotouch-test/Security/KeyChainTest.cs
@@ -5,16 +5,9 @@ using System.Runtime.InteropServices;
using System.IO;
using System.Reflection;
-
-#if XAMCORE_2_0
using Foundation;
using Security;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Security {
diff --git a/tests/monotouch-test/Security/KeyTest.cs b/tests/monotouch-test/Security/KeyTest.cs
index f9a009b8c2..04d35446c1 100644
--- a/tests/monotouch-test/Security/KeyTest.cs
+++ b/tests/monotouch-test/Security/KeyTest.cs
@@ -12,7 +12,6 @@ using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
-#if XAMCORE_2_0
using Foundation;
using Security;
using ObjCRuntime;
@@ -21,11 +20,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Security {
diff --git a/tests/monotouch-test/Security/PolicyTest.cs b/tests/monotouch-test/Security/PolicyTest.cs
index c9946d348b..8553e314d7 100644
--- a/tests/monotouch-test/Security/PolicyTest.cs
+++ b/tests/monotouch-test/Security/PolicyTest.cs
@@ -11,7 +11,6 @@ using System;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
-#if XAMCORE_2_0
using Foundation;
#if MONOMAC
using AppKit;
@@ -20,24 +19,8 @@ using UIKit;
#endif
using Security;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Security {
[TestFixture]
diff --git a/tests/monotouch-test/Security/RecordTest.cs b/tests/monotouch-test/Security/RecordTest.cs
index 01c12115a2..29083bb529 100644
--- a/tests/monotouch-test/Security/RecordTest.cs
+++ b/tests/monotouch-test/Security/RecordTest.cs
@@ -1,7 +1,6 @@
// Copyright 2014-2015 Xamarin Inc. All rights reserved
using System;
-#if XAMCORE_2_0
using Foundation;
using Security;
#if MONOMAC
@@ -9,11 +8,6 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using NUnit.Framework.Internal;
using System.Security.Cryptography.X509Certificates;
diff --git a/tests/monotouch-test/Security/SecSharedCredentialTest.cs b/tests/monotouch-test/Security/SecSharedCredentialTest.cs
index 4130af55f8..e4eafea468 100644
--- a/tests/monotouch-test/Security/SecSharedCredentialTest.cs
+++ b/tests/monotouch-test/Security/SecSharedCredentialTest.cs
@@ -2,15 +2,9 @@
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using Security;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.Security {
diff --git a/tests/monotouch-test/Security/SecStatusCodeTest.cs b/tests/monotouch-test/Security/SecStatusCodeTest.cs
index 44f61c57c4..bfbff0f302 100644
--- a/tests/monotouch-test/Security/SecStatusCodeTest.cs
+++ b/tests/monotouch-test/Security/SecStatusCodeTest.cs
@@ -10,13 +10,8 @@
using System;
using NUnit.Framework;
-#if XAMCORE_2_0
using Foundation;
using Security;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-#endif
namespace MonoTouchFixtures.Security {
diff --git a/tests/monotouch-test/Security/SecureTransportTest.cs b/tests/monotouch-test/Security/SecureTransportTest.cs
index 4be891c63c..bb148e83ba 100644
--- a/tests/monotouch-test/Security/SecureTransportTest.cs
+++ b/tests/monotouch-test/Security/SecureTransportTest.cs
@@ -11,7 +11,6 @@ using System;
using System.Net.Sockets;
using System.Text;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using Security;
using ObjCRuntime;
@@ -20,24 +19,8 @@ using AppKit;
#else
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.Security;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.Security {
[TestFixture]
diff --git a/tests/monotouch-test/SpriteKit/FieldNodeTest.cs b/tests/monotouch-test/SpriteKit/FieldNodeTest.cs
index 13320df12d..43c5d41703 100644
--- a/tests/monotouch-test/SpriteKit/FieldNodeTest.cs
+++ b/tests/monotouch-test/SpriteKit/FieldNodeTest.cs
@@ -2,28 +2,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using SpriteKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using OpenTK;
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
diff --git a/tests/monotouch-test/SpriteKit/KeyframeSequenceTest.cs b/tests/monotouch-test/SpriteKit/KeyframeSequenceTest.cs
index 597de43190..482e590019 100644
--- a/tests/monotouch-test/SpriteKit/KeyframeSequenceTest.cs
+++ b/tests/monotouch-test/SpriteKit/KeyframeSequenceTest.cs
@@ -10,26 +10,10 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
diff --git a/tests/monotouch-test/SpriteKit/PhysicsBodyTest.cs b/tests/monotouch-test/SpriteKit/PhysicsBodyTest.cs
index 4f014d967b..7b8129fcc5 100644
--- a/tests/monotouch-test/SpriteKit/PhysicsBodyTest.cs
+++ b/tests/monotouch-test/SpriteKit/PhysicsBodyTest.cs
@@ -11,28 +11,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using SpriteKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
@@ -45,7 +29,7 @@ namespace MonoTouchFixtures.SpriteKit {
TestRuntime.AssertXcodeVersion (5, 0, 1);
// bug 13772 - that call actually return a PKPhysicsBody (private PhysicKit framework)
- SizeF size = new SizeF (3, 2);
+ var size = new CGSize (3, 2);
using (var body = SKPhysicsBody.CreateRectangularBody (size)) {
Assert.That (body, Is.TypeOf (), "SKPhysicsBody");
}
@@ -59,7 +43,7 @@ namespace MonoTouchFixtures.SpriteKit {
public void DefaultCtor ()
{
using (var Scene = new SKScene(UIScreen.MainScreen.Bounds.Size))
- using (var b = new SKSpriteNode (UIColor.Red, new SizeF (10, 10))) {
+ using (var b = new SKSpriteNode (UIColor.Red, new CGSize (10, 10))) {
b.PhysicsBody = new SKPhysicsBody ();
Scene.AddChild (b); //BOOM
}
diff --git a/tests/monotouch-test/SpriteKit/PhysicsJointFixedTest.cs b/tests/monotouch-test/SpriteKit/PhysicsJointFixedTest.cs
index 2391f3ccbb..0fc700c6fa 100644
--- a/tests/monotouch-test/SpriteKit/PhysicsJointFixedTest.cs
+++ b/tests/monotouch-test/SpriteKit/PhysicsJointFixedTest.cs
@@ -11,26 +11,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
@@ -42,13 +27,13 @@ namespace MonoTouchFixtures.SpriteKit {
{
TestRuntime.AssertXcodeVersion (5, 0, 1);
- using (var s = new SKScene (new SizeF (320, 240)))
+ using (var s = new SKScene (new CGSize (320, 240)))
using (var b1 = SKPhysicsBody.CreateCircularBody (1.0f))
using (var b2 = SKPhysicsBody.CreateCircularBody (2.0f)) {
// according to Apple docs we should not create this joint before adding it to a scene
// The body must be connected to a node that is already part of the scene’s node tree.
// Note that doing the same for a `SKPhysicsJointLimit` does crash
- using (var j = SKPhysicsJointFixed.Create (b1, b2, new PointF (10, 20))) {
+ using (var j = SKPhysicsJointFixed.Create (b1, b2, new CGPoint (10, 20))) {
Assert.That (j.BodyA, Is.SameAs (b1), "BodyA");
Assert.That (j.BodyB, Is.SameAs (b2), "BodyB");
diff --git a/tests/monotouch-test/SpriteKit/PhysicsJointLimitTest.cs b/tests/monotouch-test/SpriteKit/PhysicsJointLimitTest.cs
index a1ab4465fd..df125612bd 100644
--- a/tests/monotouch-test/SpriteKit/PhysicsJointLimitTest.cs
+++ b/tests/monotouch-test/SpriteKit/PhysicsJointLimitTest.cs
@@ -11,26 +11,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
@@ -42,7 +27,7 @@ namespace MonoTouchFixtures.SpriteKit {
{
TestRuntime.AssertXcodeVersion (5, 0, 1);
- using (var s = new SKScene (new SizeF (320, 240)))
+ using (var s = new SKScene (new CGSize (320, 240)))
using (var b1 = SKPhysicsBody.CreateCircularBody (1.0f))
using (var b2 = SKPhysicsBody.CreateCircularBody (2.0f)) {
// The body must be connected to a node that is already part of the scene’s node tree.
@@ -56,7 +41,7 @@ namespace MonoTouchFixtures.SpriteKit {
// if you create the SKPhysicsJointLimit *before* adding the nodes
// to a scene then you'll crash and burn. ref: bug #14793
- using (var j = SKPhysicsJointLimit.Create (b1, b2, PointF.Empty, new PointF (10, 20))) {
+ using (var j = SKPhysicsJointLimit.Create (b1, b2, CGPoint.Empty, new CGPoint (10, 20))) {
Assert.That (j.BodyA, Is.SameAs (b1), "BodyA");
Assert.That (j.BodyB, Is.SameAs (b2), "BodyB");
diff --git a/tests/monotouch-test/SpriteKit/PhysicsWorldTest.cs b/tests/monotouch-test/SpriteKit/PhysicsWorldTest.cs
index aaf9c747d0..73d9e3d0d3 100644
--- a/tests/monotouch-test/SpriteKit/PhysicsWorldTest.cs
+++ b/tests/monotouch-test/SpriteKit/PhysicsWorldTest.cs
@@ -2,28 +2,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using OpenTK;
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
diff --git a/tests/monotouch-test/SpriteKit/SK3DNodeTest.cs b/tests/monotouch-test/SpriteKit/SK3DNodeTest.cs
index 7e7e19ff89..2d322bfa40 100644
--- a/tests/monotouch-test/SpriteKit/SK3DNodeTest.cs
+++ b/tests/monotouch-test/SpriteKit/SK3DNodeTest.cs
@@ -2,7 +2,6 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
@@ -10,26 +9,9 @@ using UIKit;
using SpriteKit;
using ObjCRuntime;
using SceneKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SceneKit;
-#endif
using OpenTK;
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
diff --git a/tests/monotouch-test/SpriteKit/SKShapeNodeTest.cs b/tests/monotouch-test/SpriteKit/SKShapeNodeTest.cs
index f15886d3a1..cf22ad4129 100644
--- a/tests/monotouch-test/SpriteKit/SKShapeNodeTest.cs
+++ b/tests/monotouch-test/SpriteKit/SKShapeNodeTest.cs
@@ -11,27 +11,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using SpriteKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat = global::System.Single;
-using nint = global::System.Int32;
-using nuint = global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
[Preserve (AllMembers = true)]
@@ -44,8 +29,8 @@ namespace MonoTouchFixtures.SpriteKit {
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
var pts = new[] {
- new PointF (0, 0),
- new PointF (320, 568)
+ new CGPoint (0, 0),
+ new CGPoint (320, 568)
};
var result = SKShapeNode.FromPoints (pts);
@@ -59,8 +44,8 @@ namespace MonoTouchFixtures.SpriteKit {
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
var pts = new [] {
- new PointF (0, 0),
- new PointF (320, 568)
+ new CGPoint (0, 0),
+ new CGPoint (320, 568)
};
var result = SKShapeNode.FromPoints (pts, 1, 1);
@@ -76,8 +61,8 @@ namespace MonoTouchFixtures.SpriteKit {
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
var pts = new[] {
- new PointF (0, 0),
- new PointF (320, 568)
+ new CGPoint (0, 0),
+ new CGPoint (320, 568)
};
var result = SKShapeNode.FromSplinePoints (pts);
@@ -91,8 +76,8 @@ namespace MonoTouchFixtures.SpriteKit {
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 10, throwIfOtherPlatform: false);
var pts = new [] {
- new PointF (0, 0),
- new PointF (320, 568)
+ new CGPoint (0, 0),
+ new CGPoint (320, 568)
};
var result = SKShapeNode.FromSplinePoints (pts, 1, 1);
diff --git a/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs b/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs
index 7850b36df1..37dc4ad711 100644
--- a/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs
+++ b/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs
@@ -1,19 +1,12 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
#endif
using SpriteKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
diff --git a/tests/monotouch-test/SpriteKit/SpriteNodeTest.cs b/tests/monotouch-test/SpriteKit/SpriteNodeTest.cs
index 4478e093af..1d9833adc7 100644
--- a/tests/monotouch-test/SpriteKit/SpriteNodeTest.cs
+++ b/tests/monotouch-test/SpriteKit/SpriteNodeTest.cs
@@ -11,7 +11,7 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
#if MONOMAC
@@ -21,23 +21,8 @@ using UIColor = AppKit.NSColor;
using UIKit;
#endif
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
@@ -72,7 +57,7 @@ namespace MonoTouchFixtures.SpriteKit {
[Test]
public void CtorColor ()
{
- using (var n = new SKSpriteNode ((UIColor) null, SizeF.Empty)) {
+ using (var n = new SKSpriteNode ((UIColor) null, CGSize.Empty)) {
CheckEmpty (n);
}
}
@@ -94,7 +79,7 @@ namespace MonoTouchFixtures.SpriteKit {
[Test]
public void CtorTextureColor ()
{
- using (var n = new SKSpriteNode (null, null, SizeF.Empty)) {
+ using (var n = new SKSpriteNode (null, null, CGSize.Empty)) {
CheckEmpty (n);
}
}
@@ -102,7 +87,7 @@ namespace MonoTouchFixtures.SpriteKit {
[Test]
public void Color ()
{
- using (var n = new SKSpriteNode (UIColor.Blue, SizeF.Empty)) {
+ using (var n = new SKSpriteNode (UIColor.Blue, CGSize.Empty)) {
#if MONOMAC
Assert.That (n.Color.ToString (), Is.EqualTo ("Device RGB(0.016804177314043,0.198350995779037,1,1)").Or.EqualTo ("Device RGB(0,0,1,1)").Or.EqualTo ("Device RGB(0.016804177314043,0.198350965976715,1,1)"), "Color-1");
#else
diff --git a/tests/monotouch-test/SpriteKit/TextureAtlasTest.cs b/tests/monotouch-test/SpriteKit/TextureAtlasTest.cs
index 638114a296..3699402b1d 100644
--- a/tests/monotouch-test/SpriteKit/TextureAtlasTest.cs
+++ b/tests/monotouch-test/SpriteKit/TextureAtlasTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using SpriteKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.SpriteKit {
diff --git a/tests/monotouch-test/SpriteKit/TextureTest.cs b/tests/monotouch-test/SpriteKit/TextureTest.cs
index 16ab8c0b55..6aa4c20e5f 100644
--- a/tests/monotouch-test/SpriteKit/TextureTest.cs
+++ b/tests/monotouch-test/SpriteKit/TextureTest.cs
@@ -11,30 +11,15 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
#if !MONOMAC
using UIKit;
#endif
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.SpriteKit {
[TestFixture]
@@ -69,10 +54,10 @@ namespace MonoTouchFixtures.SpriteKit {
#if !MONOMAC
// FIXME: bug in iOS9 - it will randomly return 0,0 (but almost always on the first try)
if (!TestRuntime.CheckSystemVersion (PlatformName.iOS, 9, 0, throwIfOtherPlatform: false))
- Assert.That (texture.Size, Is.EqualTo (new SizeF (128, 128)), "Size");
+ Assert.That (texture.Size, Is.EqualTo (new CGSize (128, 128)), "Size");
#endif
- Assert.That (texture.TextureRect, Is.EqualTo (new RectangleF (0, 0, 1, 1)), "TextureRect");
+ Assert.That (texture.TextureRect, Is.EqualTo (new CGRect (0, 0, 1, 1)), "TextureRect");
Assert.False (texture.UsesMipmaps, "UsesMipmaps");
}
}
diff --git a/tests/monotouch-test/SpriteKit/UniformTest.cs b/tests/monotouch-test/SpriteKit/UniformTest.cs
index fc708f1b5c..d373251423 100644
--- a/tests/monotouch-test/SpriteKit/UniformTest.cs
+++ b/tests/monotouch-test/SpriteKit/UniformTest.cs
@@ -1,19 +1,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using SpriteKit;
#if !MONOMAC
using UIKit;
#endif
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.UIKit;
-using MonoTouch.ObjCRuntime;
-#endif
using OpenTK;
using MatrixFloat2x2 = global::OpenTK.NMatrix2;
diff --git a/tests/monotouch-test/SpriteKit/WarpGeometryGridTest.cs b/tests/monotouch-test/SpriteKit/WarpGeometryGridTest.cs
index f36e7eb2a5..a9fb399e89 100644
--- a/tests/monotouch-test/SpriteKit/WarpGeometryGridTest.cs
+++ b/tests/monotouch-test/SpriteKit/WarpGeometryGridTest.cs
@@ -1,13 +1,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using SpriteKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-#endif
using OpenTK;
using NUnit.Framework;
diff --git a/tests/monotouch-test/StoreKit/ReceiptRefreshRequestTest.cs b/tests/monotouch-test/StoreKit/ReceiptRefreshRequestTest.cs
index 6ccf6ce669..a0c372160c 100644
--- a/tests/monotouch-test/StoreKit/ReceiptRefreshRequestTest.cs
+++ b/tests/monotouch-test/StoreKit/ReceiptRefreshRequestTest.cs
@@ -11,21 +11,12 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using StoreKit;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.StoreKit;
-#if !MONOMAC
-using MonoTouch.UIKit;
-#endif
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.StoreKit {
diff --git a/tests/monotouch-test/SystemConfiguration/CaptiveNetworkTest.cs b/tests/monotouch-test/SystemConfiguration/CaptiveNetworkTest.cs
index f9adb5b63e..61e51a9572 100644
--- a/tests/monotouch-test/SystemConfiguration/CaptiveNetworkTest.cs
+++ b/tests/monotouch-test/SystemConfiguration/CaptiveNetworkTest.cs
@@ -11,19 +11,12 @@
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using SystemConfiguration;
#if !MONOMAC
using UIKit;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SystemConfiguration;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.SystemConfiguration {
diff --git a/tests/monotouch-test/SystemConfiguration/NetworkReachabilityTest.cs b/tests/monotouch-test/SystemConfiguration/NetworkReachabilityTest.cs
index 3815982e8c..4410fc9915 100644
--- a/tests/monotouch-test/SystemConfiguration/NetworkReachabilityTest.cs
+++ b/tests/monotouch-test/SystemConfiguration/NetworkReachabilityTest.cs
@@ -10,19 +10,12 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
#if !MONOMAC
using UIKit;
#endif
using ObjCRuntime;
using SystemConfiguration;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.SystemConfiguration;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
using System.Net;
diff --git a/tests/monotouch-test/SystemConfiguration/StatusCodeErrorTest.cs b/tests/monotouch-test/SystemConfiguration/StatusCodeErrorTest.cs
index 650e2d5ca5..47d34f8ae7 100644
--- a/tests/monotouch-test/SystemConfiguration/StatusCodeErrorTest.cs
+++ b/tests/monotouch-test/SystemConfiguration/StatusCodeErrorTest.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using SystemConfiguration;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.SystemConfiguration;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.SystemConfiguration {
diff --git a/tests/monotouch-test/UIKit/AccessibilityTest.cs b/tests/monotouch-test/UIKit/AccessibilityTest.cs
index 94f61eb945..04c12dfdb0 100644
--- a/tests/monotouch-test/UIKit/AccessibilityTest.cs
+++ b/tests/monotouch-test/UIKit/AccessibilityTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/ActionSheetTest.cs b/tests/monotouch-test/UIKit/ActionSheetTest.cs
index 4b15e9db6a..63ea6f1461 100644
--- a/tests/monotouch-test/UIKit/ActionSheetTest.cs
+++ b/tests/monotouch-test/UIKit/ActionSheetTest.cs
@@ -5,26 +5,12 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -69,7 +55,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIActionSheet a = new UIActionSheet (frame)) {
Assert.That (a.Frame, Is.EqualTo (frame), "Frame");
CheckDefault (a);
diff --git a/tests/monotouch-test/UIKit/ActivityIndicatorViewTest.cs b/tests/monotouch-test/UIKit/ActivityIndicatorViewTest.cs
index d1917acac1..7da7d79cb2 100644
--- a/tests/monotouch-test/UIKit/ActivityIndicatorViewTest.cs
+++ b/tests/monotouch-test/UIKit/ActivityIndicatorViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIActivityIndicatorView aiv = new UIActivityIndicatorView (frame)) {
Assert.That (aiv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/AlertViewDelegateTest.cs b/tests/monotouch-test/UIKit/AlertViewDelegateTest.cs
index 80d97f7a96..0ce69fde65 100644
--- a/tests/monotouch-test/UIKit/AlertViewDelegateTest.cs
+++ b/tests/monotouch-test/UIKit/AlertViewDelegateTest.cs
@@ -3,13 +3,8 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/AlertViewTest.cs b/tests/monotouch-test/UIKit/AlertViewTest.cs
index 6046d481ab..62dbb96abd 100644
--- a/tests/monotouch-test/UIKit/AlertViewTest.cs
+++ b/tests/monotouch-test/UIKit/AlertViewTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -33,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIAlertView av = new UIAlertView (frame)) {
Assert.That (av.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/AppearanceTest.cs b/tests/monotouch-test/UIKit/AppearanceTest.cs
index 5e9328f8c7..ffd63f2596 100644
--- a/tests/monotouch-test/UIKit/AppearanceTest.cs
+++ b/tests/monotouch-test/UIKit/AppearanceTest.cs
@@ -11,25 +11,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
-
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/UIKit/ApplicationTest.cs b/tests/monotouch-test/UIKit/ApplicationTest.cs
index fb8f38f71d..b1964ff2f6 100644
--- a/tests/monotouch-test/UIKit/ApplicationTest.cs
+++ b/tests/monotouch-test/UIKit/ApplicationTest.cs
@@ -4,15 +4,9 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/BarButtonItemTest.cs b/tests/monotouch-test/UIKit/BarButtonItemTest.cs
index 4d8781a415..ecbf189acb 100644
--- a/tests/monotouch-test/UIKit/BarButtonItemTest.cs
+++ b/tests/monotouch-test/UIKit/BarButtonItemTest.cs
@@ -5,13 +5,8 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/ButtonTest.cs b/tests/monotouch-test/UIKit/ButtonTest.cs
index 4d20cc37f9..1c3265db1f 100644
--- a/tests/monotouch-test/UIKit/ButtonTest.cs
+++ b/tests/monotouch-test/UIKit/ButtonTest.cs
@@ -4,26 +4,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -33,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIButton b = new UIButton (frame)) {
Assert.That (b.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/CollectionViewControllerTest.cs b/tests/monotouch-test/UIKit/CollectionViewControllerTest.cs
index 48aa622e76..6e8a17e94b 100644
--- a/tests/monotouch-test/UIKit/CollectionViewControllerTest.cs
+++ b/tests/monotouch-test/UIKit/CollectionViewControllerTest.cs
@@ -3,14 +3,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/CollectionViewTransitionLayoutTest.cs b/tests/monotouch-test/UIKit/CollectionViewTransitionLayoutTest.cs
index 5438b10510..bba3e8be2b 100644
--- a/tests/monotouch-test/UIKit/CollectionViewTransitionLayoutTest.cs
+++ b/tests/monotouch-test/UIKit/CollectionViewTransitionLayoutTest.cs
@@ -3,14 +3,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/ColorTest.cs b/tests/monotouch-test/UIKit/ColorTest.cs
index df7c453764..f9132ee48c 100644
--- a/tests/monotouch-test/UIKit/ColorTest.cs
+++ b/tests/monotouch-test/UIKit/ColorTest.cs
@@ -5,25 +5,10 @@ using System;
#if !__WATCHOS__
using System.Drawing;
#endif
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/ControlTest.cs b/tests/monotouch-test/UIKit/ControlTest.cs
index f6ce62db6b..9bd67c2db4 100644
--- a/tests/monotouch-test/UIKit/ControlTest.cs
+++ b/tests/monotouch-test/UIKit/ControlTest.cs
@@ -7,25 +7,11 @@ using System.Drawing;
using System.Reflection;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -35,7 +21,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIControl c = new UIControl (frame)) {
Assert.That (c.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/DatePickerTest.cs b/tests/monotouch-test/UIKit/DatePickerTest.cs
index 04b87e365d..aff82ba9dd 100644
--- a/tests/monotouch-test/UIKit/DatePickerTest.cs
+++ b/tests/monotouch-test/UIKit/DatePickerTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -73,7 +59,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIDatePicker dp = new UIDatePicker (frame)) {
Assert.That (dp.Frame.X, Is.EqualTo (frame.X), "X");
Assert.That (dp.Frame.Y, Is.EqualTo (frame.Y), "Y");
diff --git a/tests/monotouch-test/UIKit/DeviceTest.cs b/tests/monotouch-test/UIKit/DeviceTest.cs
index 030151b54b..76012ae149 100644
--- a/tests/monotouch-test/UIKit/DeviceTest.cs
+++ b/tests/monotouch-test/UIKit/DeviceTest.cs
@@ -10,15 +10,9 @@
#if !MONOMAC
using System;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
@@ -27,17 +21,6 @@ namespace MonoTouchFixtures.UIKit {
[Preserve (AllMembers = true)]
public class DeviceTest {
-#if !XAMCORE_2_0
- [Test]
- public void CurrentDevice ()
- {
- UIDevice device = UIDevice.CurrentDevice;
- // under iOS 5.1 some API (mobileDevice on client) stopped reporting the identifier
- // this will warn us then this API "fails" too
- Assert.NotNull (device.UniqueIdentifier, "UniqueIdentifier");
- }
-#endif
-
#if !__TVOS__ && !__WATCHOS__
[Test]
public void Battery ()
diff --git a/tests/monotouch-test/UIKit/DictationPhrase.cs b/tests/monotouch-test/UIKit/DictationPhrase.cs
index 5463c9a359..5b579a0cfa 100644
--- a/tests/monotouch-test/UIKit/DictationPhrase.cs
+++ b/tests/monotouch-test/UIKit/DictationPhrase.cs
@@ -4,13 +4,8 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs b/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs
index 73ff39ed6b..76ae5a1413 100644
--- a/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs
+++ b/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs
@@ -7,7 +7,7 @@
// Copyright 2017 Microsoft. All rights reserved.
//
-#if XAMCORE_2_0 && !MONOMAC
+#if !MONOMAC
using System;
using System.Drawing;
@@ -56,4 +56,4 @@ namespace MonoTouchFixtures.UIKit {
}
}
-#endif // XAMCORE_2_0
\ No newline at end of file
+#endif // !MONOMAC
\ No newline at end of file
diff --git a/tests/monotouch-test/UIKit/EdgeInsetsTest.cs b/tests/monotouch-test/UIKit/EdgeInsetsTest.cs
index 0051676919..ba25a8135e 100644
--- a/tests/monotouch-test/UIKit/EdgeInsetsTest.cs
+++ b/tests/monotouch-test/UIKit/EdgeInsetsTest.cs
@@ -10,25 +10,11 @@
#if !MONOMAC
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -53,15 +39,15 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InsetRect_Zero ()
{
- var r = UIEdgeInsets.Zero.InsetRect (RectangleF.Empty);
- Assert.That (r, Is.EqualTo (RectangleF.Empty), "InsetRect");
+ var r = UIEdgeInsets.Zero.InsetRect (CGRect.Empty);
+ Assert.That (r, Is.EqualTo (CGRect.Empty), "InsetRect");
}
[Test]
public void InsetRect ()
{
var i = new UIEdgeInsets (10, 20, 30, 40);
- var r = new RectangleF (1, 2, 3, 4);
+ var r = new CGRect (1, 2, 3, 4);
r = i.InsetRect (r);
Assert.That (r.X, Is.EqualTo ((nfloat) 21f), "X");
Assert.That (r.Y, Is.EqualTo ((nfloat) 12f), "Y");
diff --git a/tests/monotouch-test/UIKit/FloatRangeTest.cs b/tests/monotouch-test/UIKit/FloatRangeTest.cs
index 75c8538a9b..7f8205518a 100644
--- a/tests/monotouch-test/UIKit/FloatRangeTest.cs
+++ b/tests/monotouch-test/UIKit/FloatRangeTest.cs
@@ -9,28 +9,11 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/FontTest.cs b/tests/monotouch-test/UIKit/FontTest.cs
index 5e8494535e..03617502d2 100644
--- a/tests/monotouch-test/UIKit/FontTest.cs
+++ b/tests/monotouch-test/UIKit/FontTest.cs
@@ -3,26 +3,10 @@
#if !MONOMAC
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/GestureRecognizerTest.cs b/tests/monotouch-test/UIKit/GestureRecognizerTest.cs
index 1e3ba268e0..df95c154a8 100644
--- a/tests/monotouch-test/UIKit/GestureRecognizerTest.cs
+++ b/tests/monotouch-test/UIKit/GestureRecognizerTest.cs
@@ -11,13 +11,8 @@
using System;
using System.Collections.Generic;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/GraphicsRendererTest.cs b/tests/monotouch-test/UIKit/GraphicsRendererTest.cs
index c344533750..2a50a07787 100644
--- a/tests/monotouch-test/UIKit/GraphicsRendererTest.cs
+++ b/tests/monotouch-test/UIKit/GraphicsRendererTest.cs
@@ -10,13 +10,8 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/GuidedAccessRestrictionTest.cs b/tests/monotouch-test/UIKit/GuidedAccessRestrictionTest.cs
index 81ab01fc13..1903dacb03 100644
--- a/tests/monotouch-test/UIKit/GuidedAccessRestrictionTest.cs
+++ b/tests/monotouch-test/UIKit/GuidedAccessRestrictionTest.cs
@@ -10,15 +10,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/ImageTest.cs b/tests/monotouch-test/UIKit/ImageTest.cs
index a4da8146bf..bb6d09355a 100644
--- a/tests/monotouch-test/UIKit/ImageTest.cs
+++ b/tests/monotouch-test/UIKit/ImageTest.cs
@@ -5,29 +5,13 @@ using System;
using System.Drawing;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF = CoreGraphics.CGRect;
-using SizeF = CoreGraphics.CGSize;
-using PointF = CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -68,7 +52,7 @@ namespace MonoTouchFixtures.UIKit {
using (var original = UIImage.FromFile (file)) {
Assert.That (original.CGImage.Width, Is.EqualTo ((nint) 32), "Width-a");
Assert.That (original.CGImage.Height, Is.EqualTo ((nint) 32), "Height-a");
- SizeF half = new SizeF (16f, 16f);
+ var half = new CGSize (16f, 16f);
IntPtr handle = original.CGImage.Handle;
using (var resized = original.Scale (half)) {
Assert.That (resized.CGImage.Height, Is.EqualTo (resized.CGImage.Width), "Width-Height-identical");
@@ -92,9 +76,6 @@ namespace MonoTouchFixtures.UIKit {
Assert.That (i.Images.Length, Is.EqualTo (3), "3 images");
Assert.True (i.Description.Contains ("UIAnimatedImage"), "UIAnimatedImage");
}
-#if !XAMCORE_2_0
- Assert.Null (UIImage.CreateAnimatedImage (new UIImage[0], UIEdgeInsets.Zero, 1d), "bad binding");
-#endif
}
[Test]
diff --git a/tests/monotouch-test/UIKit/ImageViewTest.cs b/tests/monotouch-test/UIKit/ImageViewTest.cs
index 3b1433a41c..98c970fec4 100644
--- a/tests/monotouch-test/UIKit/ImageViewTest.cs
+++ b/tests/monotouch-test/UIKit/ImageViewTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIImageView iv = new UIImageView (frame)) {
Assert.That (iv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/LabelTest.cs b/tests/monotouch-test/UIKit/LabelTest.cs
index 5b60f74757..e049e2d24c 100644
--- a/tests/monotouch-test/UIKit/LabelTest.cs
+++ b/tests/monotouch-test/UIKit/LabelTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UILabel l = new UILabel (frame)) {
Assert.That (l.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/LayoutConstraintTest.cs b/tests/monotouch-test/UIKit/LayoutConstraintTest.cs
index ebbf19b578..0c201ffa27 100644
--- a/tests/monotouch-test/UIKit/LayoutConstraintTest.cs
+++ b/tests/monotouch-test/UIKit/LayoutConstraintTest.cs
@@ -4,13 +4,8 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/LayoutManagerTest.cs b/tests/monotouch-test/UIKit/LayoutManagerTest.cs
index b7a2d2922d..1eed3383fd 100644
--- a/tests/monotouch-test/UIKit/LayoutManagerTest.cs
+++ b/tests/monotouch-test/UIKit/LayoutManagerTest.cs
@@ -10,26 +10,11 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/LocalNotificationTest.cs b/tests/monotouch-test/UIKit/LocalNotificationTest.cs
index 8d6e5bfa40..4f1d2eb4e2 100644
--- a/tests/monotouch-test/UIKit/LocalNotificationTest.cs
+++ b/tests/monotouch-test/UIKit/LocalNotificationTest.cs
@@ -10,27 +10,11 @@
#if !__TVOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/NavigationBarTest.cs b/tests/monotouch-test/UIKit/NavigationBarTest.cs
index ade30a0c5a..f4c6835f35 100644
--- a/tests/monotouch-test/UIKit/NavigationBarTest.cs
+++ b/tests/monotouch-test/UIKit/NavigationBarTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UINavigationBar nb = new UINavigationBar (frame)) {
Assert.That (nb.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/NavigationControllerTest.cs b/tests/monotouch-test/UIKit/NavigationControllerTest.cs
index 61dad7d19f..ad7c159c88 100644
--- a/tests/monotouch-test/UIKit/NavigationControllerTest.cs
+++ b/tests/monotouch-test/UIKit/NavigationControllerTest.cs
@@ -12,13 +12,8 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/NavigationItemTest.cs b/tests/monotouch-test/UIKit/NavigationItemTest.cs
index cd01739707..de4fbe9230 100644
--- a/tests/monotouch-test/UIKit/NavigationItemTest.cs
+++ b/tests/monotouch-test/UIKit/NavigationItemTest.cs
@@ -12,13 +12,8 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/NibTest.cs b/tests/monotouch-test/UIKit/NibTest.cs
index b5a9d49c02..f79bc139f5 100644
--- a/tests/monotouch-test/UIKit/NibTest.cs
+++ b/tests/monotouch-test/UIKit/NibTest.cs
@@ -11,15 +11,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
@@ -45,11 +39,6 @@ namespace MonoTouchFixtures.UIKit {
{
using (UINib n = UINib.FromName ("EmptyNib", null)) {
Assert.NotNull (n, "created with null options");
-#if !XAMCORE_2_0
- // obsolete name (too long and case typo)
- var result = n.InstantiateWithOwneroptions (null, null);
- Assert.That (result.Length, Is.EqualTo (0), "InstantiateWithOwneroptions");
-#endif
// newer version (same selector)
var result2 = n.Instantiate (null, null);
Assert.That (result2.Length, Is.EqualTo (0), "Instantiate");
@@ -62,11 +51,6 @@ namespace MonoTouchFixtures.UIKit {
using (NSData data = NSData.FromFile ("EmptyNib.nib"))
using (UINib n = UINib.FromData (data, null)) {
Assert.NotNull (n, "created with null options");
-#if !XAMCORE_2_0
- // obsolete name (too long and case typo)
- var result = n.InstantiateWithOwneroptions (null, null);
- Assert.That (result.Length, Is.EqualTo (0), "InstantiateWithOwneroptions");
-#endif
// newer version (same selector)
var result2 = n.Instantiate (null, null);
Assert.That (result2.Length, Is.EqualTo (0), "Instantiate");
diff --git a/tests/monotouch-test/UIKit/PageControlTest.cs b/tests/monotouch-test/UIKit/PageControlTest.cs
index 9efb4d2f21..b66ce87f5e 100644
--- a/tests/monotouch-test/UIKit/PageControlTest.cs
+++ b/tests/monotouch-test/UIKit/PageControlTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIPageControl pc = new UIPageControl (frame)) {
Assert.That (pc.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/PageViewControllerTest.cs b/tests/monotouch-test/UIKit/PageViewControllerTest.cs
index 782e455183..e3e1d1d4b4 100644
--- a/tests/monotouch-test/UIKit/PageViewControllerTest.cs
+++ b/tests/monotouch-test/UIKit/PageViewControllerTest.cs
@@ -11,13 +11,8 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/PanGestureRecognizerTest.cs b/tests/monotouch-test/UIKit/PanGestureRecognizerTest.cs
index 17faa28ecb..564c25b239 100644
--- a/tests/monotouch-test/UIKit/PanGestureRecognizerTest.cs
+++ b/tests/monotouch-test/UIKit/PanGestureRecognizerTest.cs
@@ -11,25 +11,13 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
+using CoreGraphics;
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -41,13 +29,13 @@ namespace MonoTouchFixtures.UIKit {
public void Null ()
{
using (var pgr = new UIPanGestureRecognizer (Null)) {
- pgr.SetTranslation (PointF.Empty, null);
+ pgr.SetTranslation (CGPoint.Empty, null);
var pt = pgr.TranslationInView (null);
- Assert.That (pt, Is.EqualTo (PointF.Empty), "TranslationInView");
+ Assert.That (pt, Is.EqualTo (CGPoint.Empty), "TranslationInView");
pt = pgr.VelocityInView (null);
- Assert.That (pt, Is.EqualTo (PointF.Empty), "VelocityInView");
+ Assert.That (pt, Is.EqualTo (CGPoint.Empty), "VelocityInView");
}
}
}
diff --git a/tests/monotouch-test/UIKit/PasteboardTest.cs b/tests/monotouch-test/UIKit/PasteboardTest.cs
index dc95287e16..d01f7371e0 100644
--- a/tests/monotouch-test/UIKit/PasteboardTest.cs
+++ b/tests/monotouch-test/UIKit/PasteboardTest.cs
@@ -6,15 +6,9 @@ using System;
using System.Drawing;
using System.IO;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using CoreGraphics;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.CoreGraphics;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/UIKit/PickerViewTest.cs b/tests/monotouch-test/UIKit/PickerViewTest.cs
index a559809ddf..b7dde8242f 100644
--- a/tests/monotouch-test/UIKit/PickerViewTest.cs
+++ b/tests/monotouch-test/UIKit/PickerViewTest.cs
@@ -4,27 +4,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -34,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIPickerView pv = new UIPickerView (frame)) {
Assert.That (pv.Frame.X, Is.EqualTo (frame.X), "X");
Assert.That (pv.Frame.Y, Is.EqualTo (frame.Y), "Y");
diff --git a/tests/monotouch-test/UIKit/PopoverBackgroundViewTest.cs b/tests/monotouch-test/UIKit/PopoverBackgroundViewTest.cs
index 62e081693a..f3c866f8f9 100644
--- a/tests/monotouch-test/UIKit/PopoverBackgroundViewTest.cs
+++ b/tests/monotouch-test/UIKit/PopoverBackgroundViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIPopoverBackgroundView pbv = new UIPopoverBackgroundView (frame)) {
Assert.That (pbv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/PopoverControllerTest.cs b/tests/monotouch-test/UIKit/PopoverControllerTest.cs
index c71fd3da7f..7b5b33d589 100644
--- a/tests/monotouch-test/UIKit/PopoverControllerTest.cs
+++ b/tests/monotouch-test/UIKit/PopoverControllerTest.cs
@@ -4,28 +4,15 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-using MonoTouchException=Foundation.MonoTouchException;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouchException=MonoTouch.Foundation.MonoTouchException;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
using RectangleF=CoreGraphics.CGRect;
using SizeF=CoreGraphics.CGSize;
using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
namespace MonoTouchFixtures.UIKit {
@@ -82,7 +69,7 @@ namespace MonoTouchFixtures.UIKit {
using (var bbi = new UIBarButtonItem (UIBarButtonSystemItem.Action))
using (var pc = new UIPopoverController (vc)) {
var view = UIApplication.SharedApplication.KeyWindow;
- pc.PresentFromRect (new RectangleF (10, 10, 100, 100), view, UIPopoverArrowDirection.Down, true);
+ pc.PresentFromRect (new CGRect (10, 10, 100, 100), view, UIPopoverArrowDirection.Down, true);
pc.Dismiss (true);
// works (as long as we dismiss the popover before disposing)
}
@@ -102,7 +89,7 @@ namespace MonoTouchFixtures.UIKit {
using (var bbi = new UIBarButtonItem (UIBarButtonSystemItem.Action))
using (var pc = new UIPopoverController (vc)) {
// 'vc' has never been shown
- pc.PresentFromRect (new RectangleF (10, 10, 100, 100), vc.View, UIPopoverArrowDirection.Down, true);
+ pc.PresentFromRect (new CGRect (10, 10, 100, 100), vc.View, UIPopoverArrowDirection.Down, true);
// fails with:
// Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated:]: Popovers cannot be presented from a view which does not have a window.
}
diff --git a/tests/monotouch-test/UIKit/PopoverPresentationControllerTest.cs b/tests/monotouch-test/UIKit/PopoverPresentationControllerTest.cs
index 9a9d9503f1..eb0b6afbcf 100644
--- a/tests/monotouch-test/UIKit/PopoverPresentationControllerTest.cs
+++ b/tests/monotouch-test/UIKit/PopoverPresentationControllerTest.cs
@@ -3,26 +3,11 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/ProgressViewTest.cs b/tests/monotouch-test/UIKit/ProgressViewTest.cs
index bad1c361a6..6bcd22e29b 100644
--- a/tests/monotouch-test/UIKit/ProgressViewTest.cs
+++ b/tests/monotouch-test/UIKit/ProgressViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIProgressView pv = new UIProgressView (frame)) {
Assert.That (pv.Frame.X, Is.EqualTo (frame.X), "X");
Assert.That (pv.Frame.Y, Is.EqualTo (frame.Y), "Y");
diff --git a/tests/monotouch-test/UIKit/ReferenceLibraryViewControllerTest.cs b/tests/monotouch-test/UIKit/ReferenceLibraryViewControllerTest.cs
index 4e7c35845b..ef48eabdc3 100644
--- a/tests/monotouch-test/UIKit/ReferenceLibraryViewControllerTest.cs
+++ b/tests/monotouch-test/UIKit/ReferenceLibraryViewControllerTest.cs
@@ -3,15 +3,9 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/ScrollViewTest.cs b/tests/monotouch-test/UIKit/ScrollViewTest.cs
index db7ebb871d..fc8edded36 100644
--- a/tests/monotouch-test/UIKit/ScrollViewTest.cs
+++ b/tests/monotouch-test/UIKit/ScrollViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIScrollView sv = new UIScrollView (frame)) {
Assert.That (sv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/SearchBarTest.cs b/tests/monotouch-test/UIKit/SearchBarTest.cs
index acfeb4777e..ebbe8b7aaa 100644
--- a/tests/monotouch-test/UIKit/SearchBarTest.cs
+++ b/tests/monotouch-test/UIKit/SearchBarTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -33,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UISearchBar sb = new UISearchBar (frame)) {
Assert.That (sb.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/SearchDisplayControllerTest.cs b/tests/monotouch-test/UIKit/SearchDisplayControllerTest.cs
index b3f93c766a..0d3f966d7b 100644
--- a/tests/monotouch-test/UIKit/SearchDisplayControllerTest.cs
+++ b/tests/monotouch-test/UIKit/SearchDisplayControllerTest.cs
@@ -12,13 +12,8 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/SegmentedControlTest.cs b/tests/monotouch-test/UIKit/SegmentedControlTest.cs
index 4f5e2dccd6..a84e6f7710 100644
--- a/tests/monotouch-test/UIKit/SegmentedControlTest.cs
+++ b/tests/monotouch-test/UIKit/SegmentedControlTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UISegmentedControl sc = new UISegmentedControl (frame)) {
Assert.That (sc.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/SimpleTextPrintFormatterTest.cs b/tests/monotouch-test/UIKit/SimpleTextPrintFormatterTest.cs
index 4179e0ef5f..5d1ef59861 100644
--- a/tests/monotouch-test/UIKit/SimpleTextPrintFormatterTest.cs
+++ b/tests/monotouch-test/UIKit/SimpleTextPrintFormatterTest.cs
@@ -12,15 +12,9 @@
using System;
using System.IO;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/SliderTest.cs b/tests/monotouch-test/UIKit/SliderTest.cs
index 4559405317..f9bce70180 100644
--- a/tests/monotouch-test/UIKit/SliderTest.cs
+++ b/tests/monotouch-test/UIKit/SliderTest.cs
@@ -5,25 +5,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
class SliderPoker : UISlider {
@@ -91,7 +77,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UISlider s = new UISlider (frame)) {
Assert.That (s.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/SplitViewControllerTest.cs b/tests/monotouch-test/UIKit/SplitViewControllerTest.cs
index 643872b51d..14746b49ac 100644
--- a/tests/monotouch-test/UIKit/SplitViewControllerTest.cs
+++ b/tests/monotouch-test/UIKit/SplitViewControllerTest.cs
@@ -5,13 +5,8 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/StepperTest.cs b/tests/monotouch-test/UIKit/StepperTest.cs
index 9368ba06ee..ba1fef100a 100644
--- a/tests/monotouch-test/UIKit/StepperTest.cs
+++ b/tests/monotouch-test/UIKit/StepperTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIStepper s = new UIStepper (frame)) {
Assert.That (s.Frame.X, Is.EqualTo (frame.X), "X");
Assert.That (s.Frame.Y, Is.EqualTo (frame.Y), "Y");
diff --git a/tests/monotouch-test/UIKit/StringAttributesTest.cs b/tests/monotouch-test/UIKit/StringAttributesTest.cs
index ecea077bf8..a3ddcb0c36 100644
--- a/tests/monotouch-test/UIKit/StringAttributesTest.cs
+++ b/tests/monotouch-test/UIKit/StringAttributesTest.cs
@@ -9,25 +9,10 @@
#if !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
diff --git a/tests/monotouch-test/UIKit/SwitchTest.cs b/tests/monotouch-test/UIKit/SwitchTest.cs
index 330cae70d9..fae7f8e78b 100644
--- a/tests/monotouch-test/UIKit/SwitchTest.cs
+++ b/tests/monotouch-test/UIKit/SwitchTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UISwitch s = new UISwitch (frame)) {
Assert.That (s.Frame.X, Is.EqualTo (frame.X), "X");
Assert.That (s.Frame.Y, Is.EqualTo (frame.Y), "Y");
diff --git a/tests/monotouch-test/UIKit/TabBarControllerTest.cs b/tests/monotouch-test/UIKit/TabBarControllerTest.cs
index dcc4b39b2b..8994db9e49 100644
--- a/tests/monotouch-test/UIKit/TabBarControllerTest.cs
+++ b/tests/monotouch-test/UIKit/TabBarControllerTest.cs
@@ -12,25 +12,10 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
diff --git a/tests/monotouch-test/UIKit/TabBarTest.cs b/tests/monotouch-test/UIKit/TabBarTest.cs
index 0e20c6fc94..421152ddf4 100644
--- a/tests/monotouch-test/UIKit/TabBarTest.cs
+++ b/tests/monotouch-test/UIKit/TabBarTest.cs
@@ -5,26 +5,12 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
@@ -33,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UITabBar tb = new UITabBar (frame)) {
Assert.That (tb.Frame, Is.EqualTo (frame), "Frame");
}
@@ -86,18 +72,10 @@ namespace MonoTouchFixtures.UIKit {
tb.BeginCustomizingItems (new UITabBarItem[] { item });
Assert.True (tb.IsCustomizing, "IsCustomizing-2");
-#if XAMCORE_2_0
Assert.False (tb.EndCustomizing (false), "End-1");
-#else
- Assert.False (tb.EndCustomizingAnimated (false), "End-1");
-#endif
tb.BeginCustomizingItems (null);
-#if XAMCORE_2_0
Assert.False (tb.EndCustomizing (false), "End-2");
-#else
- Assert.False (tb.EndCustomizingAnimated (false), "End-2");
-#endif
Assert.False (tb.IsCustomizing, "IsCustomizing-3");
}
diff --git a/tests/monotouch-test/UIKit/TableViewCellTest.cs b/tests/monotouch-test/UIKit/TableViewCellTest.cs
index 21f53a412f..f2102a9f1e 100644
--- a/tests/monotouch-test/UIKit/TableViewCellTest.cs
+++ b/tests/monotouch-test/UIKit/TableViewCellTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UITableViewCell tvc = new UITableViewCell (frame)) {
Assert.That (tvc.Frame.X, Is.EqualTo ((nfloat) 0.0f), "X");
Assert.That (tvc.Frame.Y, Is.EqualTo ((nfloat) 0.0f), "Y");
diff --git a/tests/monotouch-test/UIKit/TableViewControllerTest.cs b/tests/monotouch-test/UIKit/TableViewControllerTest.cs
index 6f82c7278d..bc7b18267d 100644
--- a/tests/monotouch-test/UIKit/TableViewControllerTest.cs
+++ b/tests/monotouch-test/UIKit/TableViewControllerTest.cs
@@ -11,13 +11,8 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/TableViewTest.cs b/tests/monotouch-test/UIKit/TableViewTest.cs
index 085504cec4..0506e59c64 100644
--- a/tests/monotouch-test/UIKit/TableViewTest.cs
+++ b/tests/monotouch-test/UIKit/TableViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UITableView tv = new UITableView (frame)) {
Assert.That (tv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/TarBarItemTest.cs b/tests/monotouch-test/UIKit/TarBarItemTest.cs
index 676607c0f1..4b4dc19794 100644
--- a/tests/monotouch-test/UIKit/TarBarItemTest.cs
+++ b/tests/monotouch-test/UIKit/TarBarItemTest.cs
@@ -12,28 +12,11 @@
using System;
using System.Drawing;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
diff --git a/tests/monotouch-test/UIKit/TextAttachmentTest.cs b/tests/monotouch-test/UIKit/TextAttachmentTest.cs
index ac397b24de..c66053b8fc 100644
--- a/tests/monotouch-test/UIKit/TextAttachmentTest.cs
+++ b/tests/monotouch-test/UIKit/TextAttachmentTest.cs
@@ -10,14 +10,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/TextContainerTest.cs b/tests/monotouch-test/UIKit/TextContainerTest.cs
index 56df0ebf2e..9514c5b4e7 100644
--- a/tests/monotouch-test/UIKit/TextContainerTest.cs
+++ b/tests/monotouch-test/UIKit/TextContainerTest.cs
@@ -10,14 +10,9 @@
#if !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/TextFieldTest.cs b/tests/monotouch-test/UIKit/TextFieldTest.cs
index d23b2542c8..16a44cd1a4 100644
--- a/tests/monotouch-test/UIKit/TextFieldTest.cs
+++ b/tests/monotouch-test/UIKit/TextFieldTest.cs
@@ -4,27 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using CoreGraphics;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.CoreGraphics;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -34,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UITextField tf = new UITextField (frame)) {
Assert.That (tf.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/TextViewTest.cs b/tests/monotouch-test/UIKit/TextViewTest.cs
index a085ed5ffe..3a42121d9b 100644
--- a/tests/monotouch-test/UIKit/TextViewTest.cs
+++ b/tests/monotouch-test/UIKit/TextViewTest.cs
@@ -4,26 +4,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -33,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UITextView tv = new UITextView (frame)) {
Assert.That (tv.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/ToolbarTest.cs b/tests/monotouch-test/UIKit/ToolbarTest.cs
index 73dad3aa6e..117c72ae86 100644
--- a/tests/monotouch-test/UIKit/ToolbarTest.cs
+++ b/tests/monotouch-test/UIKit/ToolbarTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIToolbar tb = new UIToolbar (frame)) {
Assert.That (tb.Frame, Is.EqualTo (frame), "Frame");
}
diff --git a/tests/monotouch-test/UIKit/UIAlertControllerTest.cs b/tests/monotouch-test/UIKit/UIAlertControllerTest.cs
index 6e1fb9b5b2..8583cd2f28 100644
--- a/tests/monotouch-test/UIKit/UIAlertControllerTest.cs
+++ b/tests/monotouch-test/UIKit/UIAlertControllerTest.cs
@@ -12,26 +12,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
diff --git a/tests/monotouch-test/UIKit/UIDocumentTest.cs b/tests/monotouch-test/UIKit/UIDocumentTest.cs
index 46cc7129a0..86515dfbd8 100644
--- a/tests/monotouch-test/UIKit/UIDocumentTest.cs
+++ b/tests/monotouch-test/UIKit/UIDocumentTest.cs
@@ -13,17 +13,10 @@ using System;
using System.IO;
using System.Reflection;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
using MonoTouchException=ObjCRuntime.RuntimeException;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-using MonoTouchException=MonoTouch.RuntimeException;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs b/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs
index 2be620c903..7558aba447 100644
--- a/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs
+++ b/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs
@@ -11,17 +11,10 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs b/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs
index 9debb0335c..c7b96a502e 100644
--- a/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs
+++ b/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs
@@ -11,19 +11,11 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using SpriteKit;
using ObjCRuntime;
using UIKit;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/UISearchControllerTest.cs b/tests/monotouch-test/UIKit/UISearchControllerTest.cs
index 65828cfd97..909def224f 100644
--- a/tests/monotouch-test/UIKit/UISearchControllerTest.cs
+++ b/tests/monotouch-test/UIKit/UISearchControllerTest.cs
@@ -12,26 +12,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
diff --git a/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs b/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs
index a1f8e30d64..1006cd9fc1 100644
--- a/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs
+++ b/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs
@@ -11,18 +11,11 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
using IntentsUI;
-#else
-using MonoTouch.CoreGraphics;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/UIStackViewTest.cs b/tests/monotouch-test/UIKit/UIStackViewTest.cs
index 1a1a27acfe..a60cc1ab36 100644
--- a/tests/monotouch-test/UIKit/UIStackViewTest.cs
+++ b/tests/monotouch-test/UIKit/UIStackViewTest.cs
@@ -12,26 +12,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
[Preserve (AllMembers = true)]
@@ -42,7 +28,7 @@ namespace MonoTouchFixtures.UIKit {
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 9, 0, throwIfOtherPlatform: false);
- UIStackView stack = new UIStackView (new RectangleF (0, 0, 10, 10));
+ UIStackView stack = new UIStackView (new CGRect (0, 0, 10, 10));
Assert.NotNull (stack, "UIStackView ctor(CGRect)");
stack.AddArrangedSubview (new UIImageView ());
diff --git a/tests/monotouch-test/UIKit/VibrancyEffectTest.cs b/tests/monotouch-test/UIKit/VibrancyEffectTest.cs
index 342909d1de..526d71ecb9 100644
--- a/tests/monotouch-test/UIKit/VibrancyEffectTest.cs
+++ b/tests/monotouch-test/UIKit/VibrancyEffectTest.cs
@@ -10,18 +10,12 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
#if !__TVOS__
using NotificationCenter;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-using MonoTouch.NotificationCenter;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
diff --git a/tests/monotouch-test/UIKit/ViewControllerTest.cs b/tests/monotouch-test/UIKit/ViewControllerTest.cs
index dc52194d03..66812b7c67 100644
--- a/tests/monotouch-test/UIKit/ViewControllerTest.cs
+++ b/tests/monotouch-test/UIKit/ViewControllerTest.cs
@@ -11,18 +11,12 @@
using System;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using ObjCRuntime;
#if !__TVOS__
using iAd;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.iAd;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.UIKit {
@@ -40,13 +34,8 @@ namespace MonoTouchFixtures.UIKit {
a.PresentModalViewController (b, true);
b.PresentModalViewController (c, true);
-#if XAMCORE_2_0
b.DismissModalViewController (true);
a.DismissModalViewController (true); //error
-#else
- b.DismissModalViewControllerAnimated (true);
- a.DismissModalViewControllerAnimated (true); //error
-#endif
}
}
#endif
@@ -64,11 +53,7 @@ namespace MonoTouchFixtures.UIKit {
a.PresentModalViewController (wb, true);
b.PresentModalViewController (wc, true);
-#if XAMCORE_2_0
c.DismissModalViewController (true); //error
-#else
- c.DismissModalViewControllerAnimated (true); //error
-#endif
}
}
#endif
diff --git a/tests/monotouch-test/UIKit/ViewTest.cs b/tests/monotouch-test/UIKit/ViewTest.cs
index bc197f3da6..2232c259b4 100644
--- a/tests/monotouch-test/UIKit/ViewTest.cs
+++ b/tests/monotouch-test/UIKit/ViewTest.cs
@@ -4,27 +4,12 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -34,7 +19,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIView v = new UIView (frame)) {
Assert.That (v.Frame, Is.EqualTo (frame), "Frame");
}
@@ -43,11 +28,11 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void HitTest_Null ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIView v = new UIView (frame)) {
- UIView result = v.HitTest (new PointF (-10, -10), null);
+ UIView result = v.HitTest (new CGPoint (-10, -10), null);
Assert.Null (result, "outside");
- result = v.HitTest (new PointF (50, 50), null);
+ result = v.HitTest (new CGPoint (50, 50), null);
Assert.That (result.Handle, Is.EqualTo (v.Handle), "inside");
}
}
@@ -55,10 +40,10 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void PointInside_Null ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIView v = new UIView (frame)) {
- Assert.False (v.PointInside (new PointF (-10, -10), null), "outside");
- Assert.True (v.PointInside (new PointF (50, 50), null), "inside");
+ Assert.False (v.PointInside (new CGPoint (-10, -10), null), "outside");
+ Assert.True (v.PointInside (new CGPoint (50, 50), null), "inside");
}
}
@@ -66,7 +51,7 @@ namespace MonoTouchFixtures.UIKit {
public void SizeThatFits ()
{
// same as LinkerTest in 'linksdk' project - but won't be linked here (for simulator)
- SizeF empty = SizeF.Empty;
+ var empty = CGSize.Empty;
using (UIView v = new UIView ()) {
Assert.True (v.SizeThatFits (empty).IsEmpty, "Empty");
}
@@ -76,10 +61,10 @@ namespace MonoTouchFixtures.UIKit {
public void Convert_Null ()
{
using (UIView v = new UIView ()) {
- Assert.That (v.ConvertPointFromView (PointF.Empty, null), Is.EqualTo (PointF.Empty), "ConvertPointFromView");
- Assert.That (v.ConvertPointToView (PointF.Empty, null), Is.EqualTo (PointF.Empty), "ConvertPointToView");
- Assert.That (v.ConvertRectFromView (RectangleF.Empty, null), Is.EqualTo (RectangleF.Empty), "ConvertRectFromView");
- Assert.That (v.ConvertRectToView (RectangleF.Empty, null), Is.EqualTo (RectangleF.Empty), "ConvertRectToView");
+ Assert.That (v.ConvertPointFromView (CGPoint.Empty, null), Is.EqualTo (CGPoint.Empty), "ConvertPointFromView");
+ Assert.That (v.ConvertPointToView (CGPoint.Empty, null), Is.EqualTo (CGPoint.Empty), "ConvertPointToView");
+ Assert.That (v.ConvertRectFromView (CGRect.Empty, null), Is.EqualTo (CGRect.Empty), "ConvertRectFromView");
+ Assert.That (v.ConvertRectToView (CGRect.Empty, null), Is.EqualTo (CGRect.Empty), "ConvertRectToView");
}
}
diff --git a/tests/monotouch-test/UIKit/WebViewTest.cs b/tests/monotouch-test/UIKit/WebViewTest.cs
index b8fb7a5110..fb5fc13261 100644
--- a/tests/monotouch-test/UIKit/WebViewTest.cs
+++ b/tests/monotouch-test/UIKit/WebViewTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -39,7 +25,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIWebView wv = new UIWebView (frame)) {
Assert.That (wv.Frame, Is.EqualTo (frame), "Frame");
Assert.Null (wv.Request, "Request");
diff --git a/tests/monotouch-test/UIKit/WindowTest.cs b/tests/monotouch-test/UIKit/WindowTest.cs
index 0c5d7f9fbb..1affe91cba 100644
--- a/tests/monotouch-test/UIKit/WindowTest.cs
+++ b/tests/monotouch-test/UIKit/WindowTest.cs
@@ -4,25 +4,11 @@
using System;
using System.Drawing;
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
using UIKit;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.UIKit {
[TestFixture]
@@ -32,7 +18,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (UIWindow w = new UIWindow (frame)) {
Assert.That (w.Frame, Is.EqualTo (frame), "Frame");
}
@@ -42,10 +28,10 @@ namespace MonoTouchFixtures.UIKit {
public void Convert_Null ()
{
using (UIWindow w = new UIWindow ()) {
- Assert.That (w.ConvertPointFromWindow (PointF.Empty, null), Is.EqualTo (PointF.Empty), "ConvertPointFromWindow");
- Assert.That (w.ConvertPointToWindow (PointF.Empty, null), Is.EqualTo (PointF.Empty), "ConvertPointToWindow");
- Assert.That (w.ConvertRectFromWindow (RectangleF.Empty, null), Is.EqualTo (RectangleF.Empty), "ConvertRectFromWindow");
- Assert.That (w.ConvertRectToWindow (RectangleF.Empty, null), Is.EqualTo (RectangleF.Empty), "ConvertRectToWindow");
+ Assert.That (w.ConvertPointFromWindow (CGPoint.Empty, null), Is.EqualTo (CGPoint.Empty), "ConvertPointFromWindow");
+ Assert.That (w.ConvertPointToWindow (CGPoint.Empty, null), Is.EqualTo (CGPoint.Empty), "ConvertPointToWindow");
+ Assert.That (w.ConvertRectFromWindow (CGRect.Empty, null), Is.EqualTo (CGRect.Empty), "ConvertRectFromWindow");
+ Assert.That (w.ConvertRectToWindow (CGRect.Empty, null), Is.EqualTo (CGRect.Empty), "ConvertRectToWindow");
}
}
diff --git a/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs b/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs
index fb24654b45..f85196d9ca 100644
--- a/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs
+++ b/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs
@@ -12,21 +12,12 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
using CoreMedia;
using AVFoundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.CoreMedia;
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.VideoToolbox {
diff --git a/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs b/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs
index 58e09f8c9c..5c65d62766 100644
--- a/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs
+++ b/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs
@@ -12,21 +12,12 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
using CoreMedia;
using AVFoundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.CoreMedia;
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.VideoToolbox {
diff --git a/tests/monotouch-test/VideoToolbox/VTFrameSiloTests.cs b/tests/monotouch-test/VideoToolbox/VTFrameSiloTests.cs
index a0a05712ef..d1f22e666d 100644
--- a/tests/monotouch-test/VideoToolbox/VTFrameSiloTests.cs
+++ b/tests/monotouch-test/VideoToolbox/VTFrameSiloTests.cs
@@ -12,21 +12,12 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
using CoreMedia;
using AVFoundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.CoreMedia;
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.VideoToolbox {
diff --git a/tests/monotouch-test/VideoToolbox/VTMultiPassStorageTests.cs b/tests/monotouch-test/VideoToolbox/VTMultiPassStorageTests.cs
index 52c96f4f8b..5b3d1ab796 100644
--- a/tests/monotouch-test/VideoToolbox/VTMultiPassStorageTests.cs
+++ b/tests/monotouch-test/VideoToolbox/VTMultiPassStorageTests.cs
@@ -12,21 +12,12 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
using CoreMedia;
using AVFoundation;
using CoreFoundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.CoreMedia;
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreFoundation;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.VideoToolbox {
diff --git a/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs b/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs
index 289dfbc8f6..394789ec01 100644
--- a/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs
+++ b/tests/monotouch-test/VideoToolbox/VTUtilitiesTests.cs
@@ -14,7 +14,6 @@ using System;
using System.Drawing;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
#if MONOMAC
@@ -28,30 +27,8 @@ using CoreFoundation;
using CoreVideo;
using CoreGraphics;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.CoreMedia;
-using MonoTouch.AVFoundation;
-using MonoTouch.CoreFoundation;
-using MonoTouch.CoreVideo;
-using MonoTouch.CoreGraphics;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.VideoToolbox {
[TestFixture]
@@ -86,7 +63,7 @@ namespace MonoTouchFixtures.VideoToolbox {
using (var ctx = new CGBitmapContext (pxbuffer.BaseAddress, originalCGImage.Width, originalCGImage.Height, 8,
4 * originalCGImage.Width, colorSpace, CGBitmapFlags.NoneSkipLast)) {
ctx.RotateCTM (0);
- ctx.DrawImage (new RectangleF (0, 0, originalCGImage.Width, originalCGImage.Height), originalCGImage);
+ ctx.DrawImage (new CGRect (0, 0, originalCGImage.Width, originalCGImage.Height), originalCGImage);
#if !__TVOS__
pxbuffer.Unlock (CVOptionFlags.None);
#else
diff --git a/tests/monotouch-test/VideoToolbox/VTVideoEncoderListTests.cs b/tests/monotouch-test/VideoToolbox/VTVideoEncoderListTests.cs
index 1f4c37ca46..f56b7a48f0 100644
--- a/tests/monotouch-test/VideoToolbox/VTVideoEncoderListTests.cs
+++ b/tests/monotouch-test/VideoToolbox/VTVideoEncoderListTests.cs
@@ -11,17 +11,10 @@
#if !__WATCHOS__
using System;
-#if XAMCORE_2_0
using Foundation;
using VideoToolbox;
using CoreMedia;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.VideoToolbox;
-using MonoTouch.UIKit;
-using MonoTouch.CoreMedia;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.VideoToolbox {
diff --git a/tests/monotouch-test/Vision/VNRequestTests.cs b/tests/monotouch-test/Vision/VNRequestTests.cs
index fee597cb07..1f9acd6003 100644
--- a/tests/monotouch-test/Vision/VNRequestTests.cs
+++ b/tests/monotouch-test/Vision/VNRequestTests.cs
@@ -8,7 +8,7 @@
// Copyright 2018 Microsoft Corporation.
//
-#if !__WATCHOS__ && XAMCORE_2_0
+#if !__WATCHOS__
using System;
using NUnit.Framework;
diff --git a/tests/monotouch-test/iAd/BannerViewTest.cs b/tests/monotouch-test/iAd/BannerViewTest.cs
index 65017669a2..b228bd5385 100644
--- a/tests/monotouch-test/iAd/BannerViewTest.cs
+++ b/tests/monotouch-test/iAd/BannerViewTest.cs
@@ -3,30 +3,13 @@
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC
using System;
-#if !__WATCHOS__
-using System.Drawing;
-#endif
-#if XAMCORE_2_0
+using CoreGraphics;
using Foundation;
#if !__WATCHOS__
using iAd;
#endif
-#else
-using MonoTouch.Foundation;
-using MonoTouch.iAd;
-#endif
using NUnit.Framework;
-#if XAMCORE_2_0
-using RectangleF=CoreGraphics.CGRect;
-using SizeF=CoreGraphics.CGSize;
-using PointF=CoreGraphics.CGPoint;
-#else
-using nfloat=global::System.Single;
-using nint=global::System.Int32;
-using nuint=global::System.UInt32;
-#endif
-
namespace MonoTouchFixtures.iAd {
[TestFixture]
@@ -36,7 +19,7 @@ namespace MonoTouchFixtures.iAd {
[Test]
public void InitWithFrame ()
{
- RectangleF frame = new RectangleF (10, 10, 100, 100);
+ var frame = new CGRect (10, 10, 100, 100);
using (ADBannerView bv = new ADBannerView (frame)) {
Assert.That (bv.Frame.X, Is.EqualTo (frame.X), "X");
Assert.That (bv.Frame.Y, Is.EqualTo (frame.Y), "Y");
@@ -47,7 +30,7 @@ namespace MonoTouchFixtures.iAd {
[Test]
public void GetClampedBannerSize ()
{
- SizeF size = new SizeF (2.0, 2.0);
+ var size = new CGSize (2.0, 2.0);
var result = ADBannerView.GetClampedBannerSize (size);
Assert.IsFalse (result.IsEmpty);
}
diff --git a/tests/monotouch-test/iAd/ViewControllerExtensionsTest.cs b/tests/monotouch-test/iAd/ViewControllerExtensionsTest.cs
index 7983ae73d4..006e40006c 100644
--- a/tests/monotouch-test/iAd/ViewControllerExtensionsTest.cs
+++ b/tests/monotouch-test/iAd/ViewControllerExtensionsTest.cs
@@ -11,16 +11,10 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using UIKit;
using iAd;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.iAd;
-using MonoTouch.UIKit;
-#endif
using NUnit.Framework;
namespace MonoTouchFixtures.CoreImage {
diff --git a/tests/monotouch-test/mono/ConfigTest.cs b/tests/monotouch-test/mono/ConfigTest.cs
index 44383489ea..ef82bbf2a2 100644
--- a/tests/monotouch-test/mono/ConfigTest.cs
+++ b/tests/monotouch-test/mono/ConfigTest.cs
@@ -2,12 +2,7 @@
using System.IO;
using System.Reflection;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/mono/MonoWeakReferenceTest.cs b/tests/monotouch-test/mono/MonoWeakReferenceTest.cs
index 7ae7bcdb4f..c34dfddf2e 100644
--- a/tests/monotouch-test/mono/MonoWeakReferenceTest.cs
+++ b/tests/monotouch-test/mono/MonoWeakReferenceTest.cs
@@ -13,12 +13,7 @@
using System;
using System.Threading;
-#if XAMCORE_2_0
using Foundation;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/mono/Symbols.cs b/tests/monotouch-test/mono/Symbols.cs
index 692130c912..8565de7e1e 100644
--- a/tests/monotouch-test/mono/Symbols.cs
+++ b/tests/monotouch-test/mono/Symbols.cs
@@ -2,14 +2,8 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/mono/WeakReferenceTest.cs b/tests/monotouch-test/mono/WeakReferenceTest.cs
index 9a0e1e8945..bedd0872b4 100644
--- a/tests/monotouch-test/mono/WeakReferenceTest.cs
+++ b/tests/monotouch-test/mono/WeakReferenceTest.cs
@@ -10,16 +10,9 @@
using System;
-#if XAMCORE_2_0
using Foundation;
using SpriteKit;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.SpriteKit;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using System.Threading;
diff --git a/tests/monotouch-test/mono/bug18634.cs b/tests/monotouch-test/mono/bug18634.cs
index db86ce94bf..855e04c29e 100644
--- a/tests/monotouch-test/mono/bug18634.cs
+++ b/tests/monotouch-test/mono/bug18634.cs
@@ -8,7 +8,6 @@ using System.Collections;
using System.Collections.ObjectModel;
using System.Linq;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
#if !__TVOS__
@@ -19,15 +18,6 @@ using CoreAnimation;
#endif
using CoreGraphics;
using CoreLocation;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouch.MapKit;
-using MonoTouch.CoreAnimation;
-using MonoTouch.CoreGraphics;
-using MonoTouch.CoreLocation;
-using MonoTouch.UIKit;
-#endif
#if !__WATCHOS__
using OpenTK;
#endif
diff --git a/tests/monotouch-test/mono/bug26989.cs b/tests/monotouch-test/mono/bug26989.cs
index a19a114521..8af01ed492 100644
--- a/tests/monotouch-test/mono/bug26989.cs
+++ b/tests/monotouch-test/mono/bug26989.cs
@@ -1,13 +1,8 @@
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-#endif
using NUnit.Framework;
diff --git a/tests/monotouch-test/monotouch-test.csproj b/tests/monotouch-test/monotouch-test.csproj
index 1f16cbf999..20cb7927f0 100644
--- a/tests/monotouch-test/monotouch-test.csproj
+++ b/tests/monotouch-test/monotouch-test.csproj
@@ -14,7 +14,7 @@
..\..\product.snk
Xamarin.iOS
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
latest
diff --git a/tests/msbuild-mac/msbuild-mac.csproj b/tests/msbuild-mac/msbuild-mac.csproj
index a7fad7bd47..60dfdee599 100644
--- a/tests/msbuild-mac/msbuild-mac.csproj
+++ b/tests/msbuild-mac/msbuild-mac.csproj
@@ -17,14 +17,14 @@
full
false
bin\x86\Debug
- __UNIFIED__;DEBUG;XAMCORE_2_0;MONOMAC
+ DEBUG;MONOMAC
prompt
4
true
bin\x86\Release
- __UNIFIED__;XAMCORE_2_0;MONOMAC;MMP_TEST
+ MONOMAC;MMP_TEST
prompt
4
diff --git a/tests/mtouch/RuntimeException.cs b/tests/mtouch/RuntimeException.cs
deleted file mode 100644
index 6c65341265..0000000000
--- a/tests/mtouch/RuntimeException.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2011-2012, Xamarin Inc. All rights reserved,
-
-using System;
-using System.Collections.Generic;
-
-namespace MonoTouch {
- public class RuntimeException : Exception {
- public RuntimeException (string message, params object [] args)
- : base (string.Format (message, args))
- {
- }
-
- public RuntimeException (int code, string message, params object [] args) :
- this (code, false, message, args)
- {
- }
-
- public RuntimeException (int code, bool error, string message, params object [] args) :
- this (code, error, null, message, args)
- {
- }
-
- public RuntimeException (int code, bool error, Exception innerException, string message, params object [] args) :
- base (String.Format (message, args), innerException)
- {
- Code = code;
- Error = error;
- }
-
- public int Code { get; private set; }
-
- public bool Error { get; private set; }
-
- // http://blogs.msdn.com/b/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx
- public override string ToString ()
- {
- return String.Format ("{0} MT{1:0000}: {2}",
- Error ? "error" : "warning", Code, Message);
- }
- }
-}
diff --git a/tests/mtouch/mtouch.csproj b/tests/mtouch/mtouch.csproj
index 0f382fe64e..2f11ec0a4e 100644
--- a/tests/mtouch/mtouch.csproj
+++ b/tests/mtouch/mtouch.csproj
@@ -89,7 +89,6 @@
ErrorHelper.cs
-
SdkVersions.cs
diff --git a/tests/scriptingbridge/Makefile b/tests/scriptingbridge/Makefile
index 3e2ba1ccb0..c6b57d0cdb 100644
--- a/tests/scriptingbridge/Makefile
+++ b/tests/scriptingbridge/Makefile
@@ -31,11 +31,11 @@ build/compat/finder.dll:
build/mobile-%/test.app: build/mobile-%/finder.dll
rm -Rf $@
- $(SYSTEM_CSC) "/out:build/mobile-$*/test.exe" "/r:build/mobile-$*/finder.dll" /r:$(TOP)/src/build/mac/mobile-$*/Xamarin.Mac.dll /t:exe "test.cs" -define:XAMCORE_2_0
+ $(SYSTEM_CSC) "/out:build/mobile-$*/test.exe" "/r:build/mobile-$*/finder.dll" /r:$(TOP)/src/build/mac/mobile-$*/Xamarin.Mac.dll /t:exe "test.cs"
$(MMP) -nolink "-minos=10.9" -o "build/mobile-$*" -n "test" --profile "4.5" -a $(TOP)/src/build/mac/mobile-$*/Xamarin.Mac.dll -a "build/mobile-$*/finder.dll" "build/mobile-$*/test.exe" --profile mobile --arch $(shell test '$*' == '32' && echo i386 || echo x86_64)
build/mobile-%/finder.dll:
- $(BMAC) --unified-mobile-profile --out=build/mobile-$*/finder.dll --outdir=build/mobile-$*/ -baselib:$(TOP)/src/build/mac/mobile-$*/Xamarin.Mac.dll -d=XAMCORE_2_0 finder.cs
+ $(BMAC) --unified-mobile-profile --out=build/mobile-$*/finder.dll --outdir=build/mobile-$*/ -baselib:$(TOP)/src/build/mac/mobile-$*/Xamarin.Mac.dll finder.cs
clean-local::
@rm -rf build/
diff --git a/tests/scriptingbridge/finder.cs b/tests/scriptingbridge/finder.cs
index 2263922c6e..e8943196ca 100644
--- a/tests/scriptingbridge/finder.cs
+++ b/tests/scriptingbridge/finder.cs
@@ -1,12 +1,6 @@
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
using ScriptingBridge;
-#else
-using MonoMac.Foundation;
-using MonoMac.ObjCRuntime;
-using MonoMac.ScriptingBridge;
-#endif
namespace Finder
{
diff --git a/tests/scriptingbridge/test.cs b/tests/scriptingbridge/test.cs
index d835a626ea..4eefa0bdf0 100644
--- a/tests/scriptingbridge/test.cs
+++ b/tests/scriptingbridge/test.cs
@@ -1,13 +1,7 @@
using System;
using Finder;
-#if XAMCORE_2_0
using AppKit;
using ScriptingBridge;
-#else
-using nuint = System.Int32;
-using MonoMac.AppKit;
-using MonoMac.ScriptingBridge;
-#endif
namespace ScriptingBridge.Tests
{
diff --git a/tests/templates/WatchContainer/Container.csproj b/tests/templates/WatchContainer/Container.csproj
index 37cb73eb9c..8492954034 100644
--- a/tests/templates/WatchContainer/Container.csproj
+++ b/tests/templates/WatchContainer/Container.csproj
@@ -10,7 +10,7 @@
Resources
Container
obj\$(Platform)\$(Configuration)-watchos
- XAMCORE_2_0;XAMCORE_3_0;
+ XAMCORE_3_0;
true
diff --git a/tests/templates/WatchExtension/Extension.csproj b/tests/templates/WatchExtension/Extension.csproj
index 1630ee8882..6fc1d1d7ca 100644
--- a/tests/templates/WatchExtension/Extension.csproj
+++ b/tests/templates/WatchExtension/Extension.csproj
@@ -12,7 +12,7 @@
testextension
True
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
obj\$(Platform)\$(Configuration)-watchos-extension
diff --git a/tests/test-libraries/testgenerator.cs b/tests/test-libraries/testgenerator.cs
index 7d029de33b..65e7ffbd9f 100644
--- a/tests/test-libraries/testgenerator.cs
+++ b/tests/test-libraries/testgenerator.cs
@@ -89,9 +89,9 @@ static class C {
new BindAsData { Managed = "CLLocationCoordinate2D", Native = "CLLocationCoordinate2D", ManagedNewExpression = "new CLLocationCoordinate2D (11, 12)", Map = ".CoordinateValue", MapFrom = "FromMKCoordinate", MinMacOSVersion = new Version (10, 9) },
new BindAsData { Managed = "SCNVector3", Native = "SCNVector3", ManagedNewExpression = "new SCNVector3 (13, 14, 15)", Map = ".Vector3Value", MapFrom = "FromVector", MinMacOSVersion = new Version (10, 8), MinXcodeVersion = new Version (8, 0) },
new BindAsData { Managed = "SCNVector4", Native = "SCNVector4", ManagedNewExpression = "new SCNVector4 (16, 17, 18, 19)", Map = ".Vector4Value", MapFrom = "FromVector", MinMacOSVersion = new Version (10, 8), MinXcodeVersion = new Version (8, 0) },
- new BindAsData { Managed = "CGPoint", Native = "CGPoint", ManagedCondition = "XAMCORE_2_0 && !__MACOS__", ManagedNewExpression = "new CGPoint (19, 20)", Map = ".CGPointValue", MapFrom = "FromCGPoint" },
- new BindAsData { Managed = "CGSize", Native = "CGSize", ManagedCondition = "XAMCORE_2_0 && !__MACOS__", ManagedNewExpression = "new CGSize (21, 22)", Map = ".CGSizeValue", MapFrom = "FromCGSize" },
- new BindAsData { Managed = "CGRect", Native = "CGRect", ManagedCondition = "XAMCORE_2_0 && !__MACOS__", ManagedNewExpression = "new CGRect (23, 24, 25, 26)", Map = ".CGRectValue", MapFrom = "FromCGRect" },
+ new BindAsData { Managed = "CGPoint", Native = "CGPoint", ManagedCondition = "!__MACOS__", ManagedNewExpression = "new CGPoint (19, 20)", Map = ".CGPointValue", MapFrom = "FromCGPoint" },
+ new BindAsData { Managed = "CGSize", Native = "CGSize", ManagedCondition = "!__MACOS__", ManagedNewExpression = "new CGSize (21, 22)", Map = ".CGSizeValue", MapFrom = "FromCGSize" },
+ new BindAsData { Managed = "CGRect", Native = "CGRect", ManagedCondition = "!__MACOS__", ManagedNewExpression = "new CGRect (23, 24, 25, 26)", Map = ".CGRectValue", MapFrom = "FromCGRect" },
new BindAsData { Managed = "UIEdgeInsets", Native = "UIEdgeInsets", ManagedCondition = "HAVE_UIKIT", ManagedNewExpression = "new UIEdgeInsets (27, 28, 29, 30)", Map = ".UIEdgeInsetsValue", MapFrom = "FromUIEdgeInsets" },
new BindAsData { Managed = "UIOffset", Native = "UIOffset", ManagedCondition = "HAVE_UIKIT", ManagedNewExpression = "new UIOffset (31, 32)", Map = ".UIOffsetValue", MapFrom = "FromUIOffset" },
new BindAsData { Managed = "MKCoordinateSpan", Native = "MKCoordinateSpan", ManagedCondition = "HAVE_MAPKIT", ManagedNewExpression = "new MKCoordinateSpan (33, 34)", Map = ".CoordinateSpanValue", MapFrom = "FromMKCoordinateSpan", MinMacOSVersion = new Version (10, 9) },
@@ -327,10 +327,6 @@ static class C {
static void WriteFrameworkDefines (StringBuilder w)
{
w.AppendLine (@"
-#if __UNIFIED__
-#define XAMCORE_2_0
-#endif
-
#if __IOS__ || __MACOS__ || __TVOS__
#define HAVE_COREANIMATION
#endif
@@ -343,9 +339,8 @@ static class C {
#define HAVE_UIKIT
#endif
-#if XAMCORE_2_0
#define HAVE_MAPKIT
-#endif");
+");
}
@@ -356,7 +351,6 @@ static class C {
w.AppendLine (@"
using System;
-#if __UNIFIED__
using AVFoundation;
#if HAVE_COREANIMATION
using CoreAnimation;
@@ -376,14 +370,6 @@ using Security;
#if HAVE_UIKIT
using UIKit;
#endif
-#else
-#if !__WATCHOS__
-using System.Drawing;
-#endif
-using MonoTouch.ObjCRuntime;
-using MonoTouch.Foundation;
-using MonoTouch.UIKit;
-#endif
namespace Bindings.Test {
partial interface ObjCRegistrarTest {
@@ -739,10 +725,6 @@ namespace Bindings.Test {
w.AppendLine (@"using System;
using System.Runtime.InteropServices;
-#if !__UNIFIED__
-using nint=System.Int32;
-#endif
-
namespace Bindings.Test
{
");
@@ -789,7 +771,6 @@ namespace Bindings.Test
WriteFrameworkDefines (w);
w.AppendLine (@"
using System;
-#if XAMCORE_2_0
using AVFoundation;
#if HAVE_COREANIMATION
using CoreAnimation;
@@ -815,13 +796,6 @@ using NativeException=Foundation.ObjCException;
#else
using NativeException=Foundation.MonoTouchException;
#endif
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-using MonoTouchException=MonoTouch.RuntimeException;
-using NativeException=MonoTouch.Foundation.MonoTouchException;
-#endif
using NUnit.Framework;
using Bindings.Test;
@@ -1448,14 +1422,8 @@ namespace MonoTouchFixtures.ObjCRuntime {
using System;
using System.Runtime.InteropServices;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch;
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using Bindings.Test;
diff --git a/tests/xammac_tests/AppKit/NSGridViewTest.cs b/tests/xammac_tests/AppKit/NSGridViewTest.cs
index fbe867999e..ed2eb8a079 100644
--- a/tests/xammac_tests/AppKit/NSGridViewTest.cs
+++ b/tests/xammac_tests/AppKit/NSGridViewTest.cs
@@ -3,7 +3,7 @@
//
-#if XAMCORE_2_0 && __IOS__
+#if __IOS__
using System;
using AppKit;
@@ -135,4 +135,4 @@ namespace MonoTouchFixtures.AppKit {
}
}
-#endif // XAMCORE_2_0 && __IOS__
+#endif // __IOS__
diff --git a/tests/xammac_tests/xammac_tests.csproj b/tests/xammac_tests/xammac_tests.csproj
index cebd26ed5e..5f73082f72 100644
--- a/tests/xammac_tests/xammac_tests.csproj
+++ b/tests/xammac_tests/xammac_tests.csproj
@@ -18,7 +18,7 @@
full
false
bin\x86\Debug
- __UNIFIED__;DEBUG;MONOMAC;XAMCORE_2_0;XAMMAC_TESTS
+ DEBUG;MONOMAC;XAMMAC_TESTS
prompt
0
false
@@ -39,7 +39,7 @@
true
bin\x86\Release
- __UNIFIED__;MONOMAC;XAMCORE_2_0;XAMMAC_TESTS
+ MONOMAC;XAMMAC_TESTS
prompt
0
false
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.tvOS.csproj.in b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.tvOS.csproj.in
index bd3f348aa4..be13baf84c 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.tvOS.csproj.in
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.tvOS.csproj.in
@@ -12,7 +12,7 @@
67,168,169,219,414,612,618,649,672
Xamarin.TVOS
Resources
- XAMCORE_2_0;XAMCORE_2_0;XAMCORE_3_0;
+ XAMCORE_3_0;
True
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.Extension.csproj.in b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.Extension.csproj.in
index 072b9a1ec8..7b4d93e363 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.Extension.csproj.in
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.Extension.csproj.in
@@ -12,7 +12,7 @@
%NAME%-watchos-extension
True
obj\$(Platform)\$(Configuration)-unified
- XAMCORE_2_0
+
obj\$(Platform)\$(Configuration)-watchos-extension
cjk,mideast,other,rare,west
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.csproj.in b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.csproj.in
index 05c7443059..b56f46f45b 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.csproj.in
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/Managed.watchOS.csproj.in
@@ -10,7 +10,7 @@
Resources
%NAME%-container
obj\$(Platform)\$(Configuration)-watchos
- XAMCORE_2_0;XAMCORE_3_0;
+ XAMCORE_3_0;
true
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/TestRunner/Core/HttpTextWriter.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/TestRunner/Core/HttpTextWriter.cs
index 5665c1160f..43ace16cf3 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/TestRunner/Core/HttpTextWriter.cs
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/common/TestRunner/Core/HttpTextWriter.cs
@@ -12,11 +12,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
-#if __UNIFIED__
using Foundation;
-#else
-using MonoTouch.Foundation;
-#endif
namespace BCLTests.TestRunner.Core {
class HttpTextWriter : TextWriter
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/Assert.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/Assert.cs
index 824d01b581..43c5fb678c 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/Assert.cs
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/Assert.cs
@@ -5,13 +5,8 @@ using System.Resources;
using System.Runtime.InteropServices;
using System.Diagnostics;
-#if XAMCORE_2_0
using Foundation;
using ObjCRuntime;
-#else
-using MonoTouch.Foundation;
-using MonoTouch.ObjCRuntime;
-#endif
using NUnit.Framework;
using NUnit.Framework.Constraints;
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/MacTestMain.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/MacTestMain.cs
index 0b944ead70..17eacf026e 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/MacTestMain.cs
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/macOS/MacTestMain.cs
@@ -4,13 +4,8 @@ using System.Reflection;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
-#if XAMCORE_2_0 || __UNIFIED__
using AppKit;
using Foundation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#endif
using BCLTests;
using Xamarin.iOS.UnitTests;
using Xamarin.iOS.UnitTests.NUnit;
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/watchOS/Container/Container.csproj b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/watchOS/Container/Container.csproj
index 84ea65e7c9..b8268c10fa 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/watchOS/Container/Container.csproj
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/Resources/src/watchOS/Container/Container.csproj
@@ -10,7 +10,7 @@
Resources
Container
obj\$(Platform)\$(Configuration)-watchos
- XAMCORE_2_0;XAMCORE_3_0;
+ XAMCORE_3_0;
true
diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/XamariniOSTemplate.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/XamariniOSTemplate.cs
index 3b146329af..bac688757d 100644
--- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/XamariniOSTemplate.cs
+++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestImporter/Templates/Managed/XamariniOSTemplate.cs
@@ -656,13 +656,13 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared.TestImporter.Templates.Managed {
result = result.Replace (TargetFrameworkVersionKey, "v4.5.2");
result = result.Replace (TargetExtraInfoKey,
"true");
- result = result.Replace (DefineConstantsKey, "XAMCORE_2_0;ADD_BCL_EXCLUSIONS;XAMMAC_4_5");
+ result = result.Replace (DefineConstantsKey, "ADD_BCL_EXCLUSIONS;XAMMAC_4_5");
break;
case Platform.MacOSModern:
result = result.Replace (TargetFrameworkVersionKey, "v2.0");
result = result.Replace (TargetExtraInfoKey,
"Xamarin.Mac");
- result = result.Replace (DefineConstantsKey, "XAMCORE_2_0;ADD_BCL_EXCLUSIONS;MOBILE;XAMMAC");
+ result = result.Replace (DefineConstantsKey, "ADD_BCL_EXCLUSIONS;MOBILE;XAMMAC");
break;
}
return result;
diff --git a/tests/xharness/Targets/MacTarget.cs b/tests/xharness/Targets/MacTarget.cs
index 1515bbd268..09652916c2 100644
--- a/tests/xharness/Targets/MacTarget.cs
+++ b/tests/xharness/Targets/MacTarget.cs
@@ -86,10 +86,10 @@ namespace Xharness.Targets
protected override string AdditionalDefines {
get {
- var rv = "XAMCORE_2_0";
+ var rv = "";
if (Full)
- rv += ";XAMMAC_4_5";
+ rv += "XAMMAC_4_5";
return rv;
}
diff --git a/tests/xharness/Targets/TVOSTarget.cs b/tests/xharness/Targets/TVOSTarget.cs
index dc742aa9f1..16cbedf443 100644
--- a/tests/xharness/Targets/TVOSTarget.cs
+++ b/tests/xharness/Targets/TVOSTarget.cs
@@ -83,7 +83,7 @@ namespace Xharness.Targets {
protected override string AdditionalDefines {
get {
- return "XAMCORE_2_0;XAMCORE_3_0;MONOTOUCH_TV;";
+ return "XAMCORE_3_0;MONOTOUCH_TV;";
}
}
diff --git a/tests/xharness/Targets/TodayExtensionTarget.cs b/tests/xharness/Targets/TodayExtensionTarget.cs
index e7d2c67ce1..d00d30b2bd 100644
--- a/tests/xharness/Targets/TodayExtensionTarget.cs
+++ b/tests/xharness/Targets/TodayExtensionTarget.cs
@@ -89,7 +89,7 @@ namespace Xharness.Targets {
csproj.SetImport (IsFSharp ? "$(MSBuildExtensionsPath)\\Xamarin\\iOS\\Xamarin.iOS.AppExtension.FSharp.targets" : "$(MSBuildExtensionsPath)\\Xamarin\\iOS\\Xamarin.iOS.AppExtension.CSharp.targets");
csproj.FixInfoPListInclude (suffix);
csproj.SetOutputType ("Library");
- csproj.AddAdditionalDefines ("XAMCORE_2_0;XAMCORE_3_0;TODAY_EXTENSION");
+ csproj.AddAdditionalDefines ("XAMCORE_3_0;TODAY_EXTENSION");
var ext = IsFSharp ? "fs" : "cs";
// we have diff templates for the bcl tests because they use xunit/nunit and not monotouch nunit.
csproj.AddCompileInclude ("TodayExtensionMain." + ext, Path.Combine (IsGeneratedBclTest? GeneratedTemplatePath : Harness.TodayExtensionTemplate, "TodayExtensionMain." + ext), true);
diff --git a/tests/xharness/Targets/UnifiedTarget.cs b/tests/xharness/Targets/UnifiedTarget.cs
index 84658eac6e..ee4af5272c 100644
--- a/tests/xharness/Targets/UnifiedTarget.cs
+++ b/tests/xharness/Targets/UnifiedTarget.cs
@@ -97,7 +97,7 @@ namespace Xharness.Targets {
protected override string AdditionalDefines {
get {
- return "XAMCORE_2_0";
+ return "";
}
}
diff --git a/tests/xharness/Targets/WatchOSTarget.cs b/tests/xharness/Targets/WatchOSTarget.cs
index 265dfe8ebc..e0a6edeb69 100644
--- a/tests/xharness/Targets/WatchOSTarget.cs
+++ b/tests/xharness/Targets/WatchOSTarget.cs
@@ -120,7 +120,7 @@ namespace Xharness.Targets {
csproj.FixInfoPListInclude (suffix);
csproj.SetOutputType ("Library");
csproj.AddAdditionalDefines ("BITCODE", "iPhone", "Release");
- csproj.AddAdditionalDefines ("XAMCORE_2_0;XAMCORE_3_0;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;");
+ csproj.AddAdditionalDefines ("XAMCORE_3_0;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;");
csproj.RemoveReferences ("OpenTK-1.0");
var ext = IsFSharp ? "fs" : "cs";
csproj.AddCompileInclude ("InterfaceController." + ext, Path.Combine (Harness.WatchOSExtensionTemplate, "InterfaceController." + ext));
@@ -200,7 +200,7 @@ namespace Xharness.Targets {
csproj.RemoveTargetFrameworkIdentifier ();
csproj.SetPlatformAssembly ("Xamarin.WatchOS");
csproj.SetImport (IsBindingProject ? BindingsImports : Imports);
- csproj.AddAdditionalDefines ("XAMCORE_2_0;XAMCORE_3_0;MONOTOUCH_WATCH;");
+ csproj.AddAdditionalDefines ("XAMCORE_3_0;MONOTOUCH_WATCH;");
csproj.FixProjectReferences (Suffix);
csproj.SetExtraLinkerDefs ("extra-linker-defs" + ExtraLinkerDefsSuffix + ".xml");
csproj.FixTestLibrariesReferences (Platform);
diff --git a/tests/xtro-sharpie/common-AudioToolbox.ignore b/tests/xtro-sharpie/common-AudioToolbox.ignore
index 91fffb039a..b0bdbb9c41 100644
--- a/tests/xtro-sharpie/common-AudioToolbox.ignore
+++ b/tests/xtro-sharpie/common-AudioToolbox.ignore
@@ -1,7 +1,7 @@
## no generator support for FastEnumeration - https://bugzilla.xamarin.com/show_bug.cgi?id=4391
!missing-protocol-conformance! AUAudioUnitBusArray should conform to NSFastEnumeration
-## deprecated (even removed in tvOS) and not publicly exposed in XAMCORE_2_0
+## deprecated (even removed in tvOS)
!missing-pinvoke! AudioFileReadPackets is not bound
## unsorted