From 169b851e63a20caba40e876193d3979a064c547d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 9 Dec 2021 16:08:47 +0100 Subject: [PATCH] [link sdk] Update test to work on macOS as well. --- tests/linker/ios/link sdk/LinkSdkRegressionTest.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index 918d3ccc87..d2e0186849 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -830,8 +830,13 @@ namespace LinkSdk { { // ref: https://bugzilla.xamarin.com/show_bug.cgi?id=21882 #if NET +#if __MACOS__ + var mem = System.Diagnostics.Process.GetCurrentProcess ().PrivateMemorySize64; + Assert.That (mem, Is.EqualTo (0), "PrivateMemorySize64"); +#else // It's not entirely clear, but it appears this is not implemented, and won't be, for mobile platforms: https://github.com/dotnet/runtime/issues/28990 Assert.Throws (() => { var mem = System.Diagnostics.Process.GetCurrentProcess ().PrivateMemorySize64; }, "PrivateMemorySize64"); +#endif // __MACOS__ #else var mem = System.Diagnostics.Process.GetCurrentProcess ().PrivateMemorySize64; // the above used a mach call that iOS samdbox did *not* allow (sandbox) on device