Skip to content

Commit 2b2f1d0

Browse files
authored
[tests] Remove Classic code from all tests. (dotnet#8702)
1 parent 8b69ddb commit 2b2f1d0

File tree

748 files changed

+477
-6429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

748 files changed

+477
-6429
lines changed

tests/BundledResources/BundledResources.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<AssemblyName>BundledResources</AssemblyName>
1414
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
1515
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
16-
<DefineConstants>XAMCORE_2_0</DefineConstants>
16+
<DefineConstants></DefineConstants>
1717
<LangVersion>latest</LangVersion>
1818
</PropertyGroup>
1919
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">

tests/BundledResources/ResourcesTest.cs

-5
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@
1111
using System.IO;
1212
using NUnit.Framework;
1313

14-
#if XAMCORE_2_0
1514
using Foundation;
1615
using ObjCRuntime;
17-
#else
18-
using MonoTouch.Foundation;
19-
using MonoTouch.ObjCRuntime;
20-
#endif
2116

2217
namespace BundledResources {
2318

tests/EmbeddedResources/EmbeddedResources.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
1616
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
1717
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
18-
<DefineConstants>XAMCORE_2_0</DefineConstants>
18+
<DefineConstants></DefineConstants>
1919
<LangVersion>latest</LangVersion>
2020
</PropertyGroup>
2121
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">

tests/EmbeddedResources/ResourcesTest.cs

-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@
1515
using System.Reflection.Emit;
1616
using NUnit.Framework;
1717

18-
#if XAMCORE_2_0
1918
using Foundation;
2019
using ObjCRuntime;
21-
#else
22-
using MonoTouch.Foundation;
23-
using MonoTouch.ObjCRuntime;
24-
#endif
2520

2621
namespace EmbeddedResources {
2722

tests/api-shared/CoreFoundation/CFNotificationCenterTest.cs

-10
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,8 @@
1010
using System;
1111
using System.Net;
1212

13-
#if XAMCORE_2_0
1413
using Foundation;
1514
using CoreFoundation;
16-
#else
17-
#if MONOMAC
18-
using MonoMac.CoreFoundation;
19-
using MonoMac.Foundation;
20-
#else
21-
using MonoTouch.CoreFoundation;
22-
using MonoTouch.Foundation;
23-
#endif
24-
#endif
2515
using NUnit.Framework;
2616

2717
namespace MonoTouchFixtures.CoreFoundation

tests/api-shared/ObjCRuntime/Registrar.cs

-8
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@
1111
using System.Reflection;
1212
using System.Runtime.InteropServices;
1313

14-
#if __UNIFIED__
1514
using Foundation;
1615
using ObjCRuntime;
17-
#elif __IOS__
18-
using MonoTouch.Foundation;
19-
using MonoTouch.ObjCRuntime;
20-
#else
21-
using MonoMac.Foundation;
22-
using MonoMac.ObjCRuntime;
23-
#endif
2416

2517
namespace XamarinTests.ObjCRuntime {
2618

tests/api-shared/ObjCRuntime/RegistrarTest.cs

-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@
1111
using System.Collections.Generic;
1212
using System.Reflection;
1313
using System.Runtime.InteropServices;
14-
#if XAMCORE_2_0
1514
using Foundation;
1615
using ObjCRuntime;
17-
#elif __IOS__
18-
using MonoTouch.Foundation;
19-
using MonoTouch.ObjCRuntime;
20-
#else
21-
using MonoMac.Foundation;
22-
using MonoMac.ObjCRuntime;
23-
#endif
2416
using NUnit.Framework;
2517

2618
namespace XamarinTests.ObjCRuntime {
@@ -32,7 +24,6 @@ public static Registrars CurrentRegistrar {
3224
}
3325
}
3426

35-
#if __UNIFIED__
3627
[Test]
3728
public void IntPtrCtor ()
3829
{
@@ -52,7 +43,6 @@ public void IntPtrCtor ()
5243
Messaging.void_objc_msgSend (ptr, Selector.GetHandle ("release"));
5344
}
5445
}
55-
#endif
5646

5747
[Register ("IntPtrCtorTestClass")]
5848
class IntPtrCtorTestClass : NSObject {

tests/apitest/apitest.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)</IntermediateOutputPath>
1414
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
1515
<XamMacArch>x86_64</XamMacArch>
16-
<DefineConstants>XAMCORE_2_0</DefineConstants>
16+
<DefineConstants></DefineConstants>
1717
</PropertyGroup>
1818
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
1919
<DebugSymbols>true</DebugSymbols>

tests/apitest/src/AVFoundation/AVAudioIONode.cs

-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.Foundation;
7-
using MonoMac.AudioUnit;
8-
using MonoMac.AVFoundation;
9-
using AUUnit = MonoMac.AudioUnit.AudioUnit;
10-
#else
114
using AppKit;
125
using Foundation;
136
using AudioUnit;
147
using AUUnit = AudioUnit.AudioUnit;
158
using AVFoundation;
16-
#endif
179

1810
namespace Xamarin.Mac.Tests
1911
{
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.Foundation;
7-
using MonoMac.AudioUnit;
8-
using MonoMac.AVFoundation;
9-
#else
104
using AppKit;
115
using Foundation;
126
using AudioUnit;
137
using AVFoundation;
148
using AUUnit = AudioUnit.AudioUnit;
15-
#endif
169

1710
namespace Xamarin.Mac.Tests
1811
{
@@ -23,11 +16,7 @@ public class AVPlayerLayerTests
2316
public void AVPlayerLayer_VideoGravity ()
2417
{
2518
AVPlayerLayer layer = new AVPlayerLayer ();
26-
#if XAMCORE_2_0
2719
Assert.IsNotNull (layer.VideoGravity);
28-
#else
29-
Assert.IsNotNull (layer.LayerVideoGravity);
30-
#endif
3120
}
3221
}
3322
}

tests/apitest/src/AppKit/NSAppearance.cs

-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
using NUnit.Framework;
22
using System;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using MonoMac.Foundation;
8-
using nfloat = System.Single;
9-
#else
104
using AppKit;
115
using ObjCRuntime;
126
using Foundation;
13-
#endif
147

158
namespace Xamarin.Mac.Tests
169
{
@@ -55,7 +48,6 @@ public void NSAppearanceShouldChangeCurrentAppearance ()
5548
Assert.AreNotEqual (appearance, NSAppearance.CurrentAppearance, "NSAppearanceShouldChangeCurrentAppearance - Failed to change appearance.");
5649
}
5750

58-
#if XAMCORE_2_0
5951
[Test]
6052
public void NSAppearanceCustomizationNull ()
6153
{
@@ -64,6 +56,5 @@ public void NSAppearanceCustomizationNull ()
6456
using (NSButton b = new NSButton ())
6557
b.SetAppearance (null);
6658
}
67-
#endif
6859
}
6960
}

tests/apitest/src/AppKit/NSApplication.cs

-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
using NUnit.Framework;
22
using System;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using MonoMac.Foundation;
8-
#else
94
using AppKit;
105
using ObjCRuntime;
116
using Foundation;
12-
#endif
137

148
namespace Xamarin.Mac.Tests
159
{

tests/apitest/src/AppKit/NSCellTest.cs

-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
using System;
22
using System.Runtime.InteropServices;
33

4-
#if XAMCORE_2_0
54
using AppKit;
65
using Foundation;
76
using ObjCRuntime;
8-
#else
9-
using MonoMac.AppKit;
10-
using MonoMac.Foundation;
11-
using MonoMac.ObjCRuntime;
12-
#endif
137

148
using NUnit.Framework;
159

tests/apitest/src/AppKit/NSClipView.cs

-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
using NUnit.Framework;
22
using System;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using CGRect = System.Drawing.RectangleF;
8-
#else
94
using AppKit;
105
using CoreGraphics;
116
using ObjCRuntime;
12-
#endif
137

148
namespace Xamarin.Mac.Tests
159
{

tests/apitest/src/AppKit/NSColor.cs

-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
using System.Threading.Tasks;
33
using NUnit.Framework;
44

5-
#if !XAMCORE_2_0
6-
using MonoMac.AppKit;
7-
using nfloat = System.Single;
8-
#else
95
using AppKit;
10-
#endif
116

127
namespace Xamarin.Mac.Tests
138
{

tests/apitest/src/AppKit/NSControl.cs

-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
using NUnit.Framework;
22
using System;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
#else
84
using AppKit;
95
using ObjCRuntime;
10-
#endif
116

127
namespace Xamarin.Mac.Tests
138
{

tests/apitest/src/AppKit/NSDraggingItem.cs

-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using MonoMac.Foundation;
8-
#else
94
using AppKit;
105
using ObjCRuntime;
116
using Foundation;
12-
#endif
137

148
namespace Xamarin.Mac.Tests
159
{

tests/apitest/src/AppKit/NSFont.cs

-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using MonoMac.Foundation;
8-
using MonoMac.CoreGraphics;
9-
using MonoMac.CoreText;
10-
#else
114
using AppKit;
125
using ObjCRuntime;
136
using Foundation;
147
using CoreGraphics;
158
using CoreText;
16-
#endif
179

1810
namespace Xamarin.Mac.Tests
1911
{

tests/apitest/src/AppKit/NSGradient.cs

-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using nfloat = System.Single;
8-
#else
94
using AppKit;
105
using ObjCRuntime;
11-
#endif
126

137
namespace Xamarin.Mac.Tests
148
{

tests/apitest/src/AppKit/NSImage.cs

-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
using NUnit.Framework;
22
using System;
33

4-
#if !XAMCORE_2_0
5-
using CGSize = System.Drawing.SizeF;
6-
using MonoMac.AppKit;
7-
using MonoMac.ObjCRuntime;
8-
#else
94
using AppKit;
105
using CoreGraphics;
116
using ObjCRuntime;
12-
#endif
137

148
namespace Xamarin.Mac.Tests
159
{

tests/apitest/src/AppKit/NSLayoutManagerTests.cs

-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
using MonoMac.ObjCRuntime;
7-
using MonoMac.Foundation;
8-
using CGPoint = System.Drawing.PointF;
9-
using CGRect = System.Drawing.RectangleF;
10-
#else
114
using AppKit;
125
using ObjCRuntime;
136
using Foundation;
147
using CoreGraphics;
15-
#endif
168

179
namespace Xamarin.Mac.Tests
1810
{

tests/apitest/src/AppKit/NSOpenGLPixelFormat.cs

-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
using System;
22
using NUnit.Framework;
33

4-
#if !XAMCORE_2_0
5-
using MonoMac.AppKit;
6-
#else
74
using AppKit;
8-
#endif
95

106
namespace Xamarin.Mac.Tests {
117
[TestFixture]

0 commit comments

Comments
 (0)