[tests] Add a check for the managed static registrar

This commit is contained in:
Rolf Bjarne Kvinge 2023-01-25 16:23:12 +01:00
Родитель a2f5e16fad
Коммит 1deba2cf61
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1296,7 +1296,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
void ThrowsICEIfDebug (TestDelegate code, string message, bool execute_release_mode = true)
{
#if NET
if (TestRuntime.IsCoreCLR) {
if (TestRuntime.IsCoreCLR || global::XamarinTests.ObjCRuntime.Registrar.CurrentRegistrar == Registrars.ManagedStatic) {
if (execute_release_mode) {
// In CoreCLR will either throw an ArgumentException:
// <System.ArgumentException: Object of type 'Foundation.NSObject' cannot be converted to type 'Foundation.NSSet'.