diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index 3eafa652b4..f893b482e5 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -167,6 +167,15 @@ partial class TestRuntime NUnit.Framework.Assert.Ignore (message); #endif } + + public static void AssertNotARM64Desktop (string message = "This test does not run on an ARM64 desktop.") + { +#if __MACOS__ || __MACCATALYST__ + if (IsARM64) + NUnit.Framework.Assert.Ignore (message); +#endif + } + public static void AssertIfSimulatorThenARM64 () { #if !__MACOS__ && !__MACCATALYST__ diff --git a/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs b/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs index 7dc1a86d9f..afa3a9c580 100644 --- a/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs +++ b/tests/monotouch-test/ObjCRuntime/ExceptionsTest.cs @@ -143,6 +143,9 @@ namespace MonoTouchFixtures.ObjCRuntime { #if !DEBUG && !__WATCHOS__ Assert.Ignore ("This test only works in debug mode in the simulator."); #endif + + TestRuntime.AssertNotARM64Desktop ("Exception handling doesn't work on ARM64 desktop: https://github.com/xamarin/xamarin-macios/issues/16264"); + var hasDebugger = global::System.Diagnostics.Debugger.IsAttached; InstallHandlers ();