From e73f490f89c9daa0366f86cfa9bc57869c873fd3 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sat, 18 Jul 2015 01:25:49 +0100 Subject: [PATCH] Prevented a crash in the tests on Mono because of a Mono bug. Signed-off-by: Dimitar Dobrev --- tests/CSharpTemp/CSharpTemp.Tests.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/CSharpTemp/CSharpTemp.Tests.cs b/tests/CSharpTemp/CSharpTemp.Tests.cs index 505ecc23..2f3f87cf 100644 --- a/tests/CSharpTemp/CSharpTemp.Tests.cs +++ b/tests/CSharpTemp/CSharpTemp.Tests.cs @@ -27,9 +27,17 @@ public class CSharpTempTests : GeneratorTestFixture var isNoParams = foo.IsNoParams; foo.SetNoParams(); } - using (var qux = new Qux()) + // TODO: remove when the bug in question is fixed + if (Type.GetType("Mono.Runtime") != null) { - new Bar(qux).Dispose(); + Assert.Fail("Crashes with Mono because of a problem with marshalling arrays: https://gist.github.com/tritao/7e62c71ffe57d6bc326e"); + } + else + { + using (var qux = new Qux()) + { + new Bar(qux).Dispose(); + } } }