[link sdk] Update test to work on macOS as well.
This commit is contained in:
Родитель
52072f02e7
Коммит
169b851e63
|
@ -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<PlatformNotSupportedException> (() => { 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче