Skip failing bool[] test cases when running under mono

This commit is contained in:
Gareth Francis 2019-07-15 16:08:31 +01:00
commit 15ad67c37f
2 changed files with 11 additions and 3 deletions

View file

@ -37,9 +37,6 @@ CPP11_TEST_CASES = \
cpp11_shared_ptr_upcast \
cpp11_strongly_typed_enumerations_simple \
# bool[] typemaps don't work correctly when running under mono
FAILING_CPP_TESTS = csharp_lib_arrays_bool
include $(srcdir)/../common.mk
# Overridden variables here

View file

@ -25,6 +25,12 @@ public class runme
CompareArrays(source, target, "bool[] INOUT");
}
if( runtimeIsMono() )
{
Console.Error.WriteLine("Tests are running on mono, failing bool[] tests skipped");
return;
}
{
bool[] source = { true, false, false, true, false, true, true, false };
bool[] target = new bool[ source.Length ];
@ -74,5 +80,10 @@ public class runme
Console.Error.Write( "{0} ", i );
Console.Error.WriteLine();
}
static bool runtimeIsMono()
{
return Type.GetType ("Mono.Runtime") != null;
}
}