diff --git a/src/Core/Platform.cs b/src/Core/Platform.cs index 9ab18244..bbd83dee 100644 --- a/src/Core/Platform.cs +++ b/src/Core/Platform.cs @@ -50,7 +50,7 @@ namespace CppSharp public static bool IsMono { - get { return System.Type.GetType("Mono.Runtime") == null; } + get { return Type.GetType("Mono.Runtime") != null; } } } } diff --git a/src/Generator.Tests/GeneratorTest.cs b/src/Generator.Tests/GeneratorTest.cs index a57a1dde..62524b22 100644 --- a/src/Generator.Tests/GeneratorTest.cs +++ b/src/Generator.Tests/GeneratorTest.cs @@ -39,7 +39,7 @@ namespace CppSharp.Utils // Workaround for CLR which does not check for .dll if the // name already has a dot. - if (Platform.IsMono) + if (!Platform.IsMono) options.SharedLibraryName += ".dll"; var path = Path.GetFullPath(GetTestsDirectory(name)); diff --git a/tests/CSharpTemp/CSharpTemp.Tests.cs b/tests/CSharpTemp/CSharpTemp.Tests.cs index a83ae64c..505ecc23 100644 --- a/tests/CSharpTemp/CSharpTemp.Tests.cs +++ b/tests/CSharpTemp/CSharpTemp.Tests.cs @@ -60,6 +60,11 @@ public class CSharpTempTests : GeneratorTestFixture [Test] public void TestMultipleInheritance() { + // TODO: remove when the bug in question is fixed + if (Type.GetType("Mono.Runtime") != null) + { + Assert.Fail("Crashes with Mono because of a problem with marshalling arrays: https://gist.github.com/tritao/7e62c71ffe57d6bc326e"); + } using (var baz = new Baz()) { Assert.That(baz.Method, Is.EqualTo(1));