[tests] Remove Classic code from all tests. (#8707)

This commit is contained in:
Rolf Bjarne Kvinge 2020-05-29 16:43:06 +02:00 коммит произвёл GitHub
Родитель 52a30b9fed
Коммит 952037b7a3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
800 изменённых файлов: 519 добавлений и 7343 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -13,7 +13,7 @@
<AssemblyName>BundledResources</AssemblyName>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
<DefineConstants></DefineConstants>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">

Просмотреть файл

@ -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 {

Просмотреть файл

@ -15,7 +15,7 @@
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
<DefineConstants></DefineConstants>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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 {

Просмотреть файл

@ -13,7 +13,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)</IntermediateOutputPath>
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
<XamMacArch>x86_64</XamMacArch>
<DefineConstants>XAMCORE_2_0</DefineConstants>
<DefineConstants></DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
}
}
}

Просмотреть файл

@ -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
}
}

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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;

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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]

Просмотреть файл

@ -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 ();
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -1,11 +1,7 @@
using System;
using NUnit.Framework;
#if !XAMCORE_2_0
using MonoMac.AppKit;
#else
using AppKit;
#endif
namespace apitest
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
}
}

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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++;

Просмотреть файл

@ -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]

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -1,11 +1,7 @@
using System;
using System.Diagnostics;
#if XAMCORE_2_0
using Darwin;
#else
using MonoMac.Darwin;
#endif
using NUnit.Framework;

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
}

Просмотреть файл

@ -1,8 +1,4 @@
#if !XAMCORE_2_0
using MonoMac.AppKit;
#else
using AppKit;
#endif
using NUnit.Framework;
namespace Xamarin.Mac.Tests

Просмотреть файл

@ -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");

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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;

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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")]

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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

Просмотреть файл

@ -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
}

Просмотреть файл

@ -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
{

Просмотреть файл

@ -15,7 +15,7 @@
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
<DefineConstants></DefineConstants>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">

Просмотреть файл

@ -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
{

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше