From 9ff5c7ad46a89597412345d35adfb071dec87069 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 4 Oct 2021 12:10:53 -0400 Subject: [PATCH] Fix tests. --- tests/monotouch-test/Metal/MTLDeviceTests.cs | 10 ++++------ .../Metal/MTLRasterizationRateLayerDescriptorTest.cs | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/monotouch-test/Metal/MTLDeviceTests.cs b/tests/monotouch-test/Metal/MTLDeviceTests.cs index 1ec3975847d8..d065b851c76c 100644 --- a/tests/monotouch-test/Metal/MTLDeviceTests.cs +++ b/tests/monotouch-test/Metal/MTLDeviceTests.cs @@ -29,17 +29,15 @@ public void GetAllDevicesTest () TestRuntime.AssertXcodeVersion (13, 0); #endif NSObject refObj = new NSObject(); - var devices = MTLDevice.GetAllDevices(ref refObj, (IMTLDevice device, NSString notifyName) => { }); + var devices = MTLDevice.GetAllDevices(); // It's possible to run on a system that does not support metal, // in which case we'll get an empty array of devices. Assert.IsNotNull (devices, "MTLDevices.GetAllDevices not null"); - - Assert.DoesNotThrow (() => { - MTLDevice.RemoveObserver (refObj); - }); } - +#endif + +#if __MACOS__ [Test] public void GetAllDevicesTestOutObserver () { diff --git a/tests/monotouch-test/Metal/MTLRasterizationRateLayerDescriptorTest.cs b/tests/monotouch-test/Metal/MTLRasterizationRateLayerDescriptorTest.cs index 944a4390ce5d..89b0993a5653 100644 --- a/tests/monotouch-test/Metal/MTLRasterizationRateLayerDescriptorTest.cs +++ b/tests/monotouch-test/Metal/MTLRasterizationRateLayerDescriptorTest.cs @@ -1,4 +1,4 @@ -#if !__WATCHOS__ +#if __IOS__ || __MACOS__ using Foundation; using Metal;