From fc7b91b318fdfee3059f251fef90e208a2c6c563 Mon Sep 17 00:00:00 2001 From: Jonathon Rossi Date: Mon, 13 Jul 2015 19:00:19 +1000 Subject: [PATCH] Upgrade to Mono 4.0.2 Re-enable unit tests that now work in 4.0.2 and declare the minimum supported Mono version as 4.0.2. --- README.md | 8 ++---- .../ConstraintViolationInDebuggerTestCase.cs | 3 -- .../GenericClassProxyTestCase.cs | 28 ++----------------- .../GenericInterfaceProxyTestCase.cs | 18 ------------ .../GenericMethodsProxyTestCase.cs | 10 ------- .../InterceptorSelectorTestCase.cs | 3 -- 6 files changed, 6 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index ad613e28ea..6294db72d3 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,9 @@ See the [documentation](docs/README.md). See the [Releases](https://github.com/castleproject/Core/releases). -## Copyright - -Copyright 2004-2015 Castle Project - ## License -Castle Core is licensed under the [Apache 2.0](http://opensource.org/licenses/Apache-2.0) license. Refer to license.txt for more information. +Castle Core is © 2004-2015 Castle Project. It is free software, and may be redistributed under the terms of the [Apache 2.0](http://opensource.org/licenses/Apache-2.0) license. ## Building @@ -32,6 +28,8 @@ msbuild /p:Configuration=SL40-Release /t:RunAllTests buildscripts/Build.proj ### Mono +Castle Core supports Mono 4.0.2+, previous 4.x releases have serious runtime bugs that cause runtime crashes. Mono 3.x releases used to work well, but are not supported. + ``` xbuild /p:Configuration=NET45-Release /t:RunAllTests buildscripts/Build.proj ``` diff --git a/src/Castle.Core.Tests/BugsReported/ConstraintViolationInDebuggerTestCase.cs b/src/Castle.Core.Tests/BugsReported/ConstraintViolationInDebuggerTestCase.cs index 54db5bd582..b20ae482dc 100644 --- a/src/Castle.Core.Tests/BugsReported/ConstraintViolationInDebuggerTestCase.cs +++ b/src/Castle.Core.Tests/BugsReported/ConstraintViolationInDebuggerTestCase.cs @@ -25,9 +25,6 @@ public class ConstraintViolationInDebuggerTestCase : BasePEVerifyTestCase // It also produces verifiable code. // In Visual Studio 2010 this test passes just fine with the debugger attached. [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void TestCase() { generator.ProxyBuilder.CreateInterfaceProxyTypeWithTarget( diff --git a/src/Castle.Core.Tests/GenericClassProxyTestCase.cs b/src/Castle.Core.Tests/GenericClassProxyTestCase.cs index f61fb0bc66..a88866d2ed 100644 --- a/src/Castle.Core.Tests/GenericClassProxyTestCase.cs +++ b/src/Castle.Core.Tests/GenericClassProxyTestCase.cs @@ -114,8 +114,9 @@ public void GenericProxyWithIndexer() } [Test] - [Platform(Exclude = "mono", Reason = "Assertion at sgen-alloc.c:460, condition `*p == NULL' not met. " + - "Fixed in https://bugzilla.xamarin.com/show_bug.cgi?id=28182")] +#if __MonoCS__ + [Ignore("System.InvalidCastException : Cannot cast from source type to destination type.")] +#endif public void ProxyWithMethodReturningGenericOfGenericOfT() { var proxy = generator.CreateClassProxy(); @@ -124,9 +125,6 @@ public void ProxyWithMethodReturningGenericOfGenericOfT() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void ProxyWithGenericArgumentsAndMethodGenericArguments() { GenClassWithGenMethods> proxy = @@ -142,9 +140,6 @@ public void ProxyWithGenericArgumentsAndMethodGenericArguments() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void ProxyWithGenericArgumentsAndMethodGenericArgumentsWithConstraints() { GenClassWithGenMethodsConstrained> proxy = @@ -160,9 +155,6 @@ public void ProxyWithGenericArgumentsAndMethodGenericArgumentsWithConstraints() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void ProxyWithGenericArgumentsAndMethodGenericArgumentsWithOneNotDefinedOnType() { GenClassWithGenMethods> proxy = @@ -212,9 +204,6 @@ public void GenericMethodArgumentsAndTypeGenericArgumentsWithSameName() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void ClassWithGenMethodOnly() { OnlyGenMethodsClass proxy = @@ -229,9 +218,6 @@ public void ClassWithGenMethodOnly() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInGenTypeGenMethodRefType() { KeepDataInterceptor interceptor = new KeepDataInterceptor(); @@ -247,9 +233,6 @@ public void MethodInfoClosedInGenTypeGenMethodRefType() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInGenTypeGenMethodValueType() { KeepDataInterceptor interceptor = new KeepDataInterceptor(); @@ -313,9 +296,6 @@ public void MethodInfoClosedInGenTypeNongenMethodValueTypeRefType() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInNongenTypeGenMethod() { KeepDataInterceptor interceptor = new KeepDataInterceptor(); @@ -330,8 +310,6 @@ public void MethodInfoClosedInNongenTypeGenMethod() } [Test] - [Platform(Exclude = "mono", Reason = "Assertion at sgen-alloc.c:460, condition `*p == NULL' not met. " + - "Fixed in https://bugzilla.xamarin.com/show_bug.cgi?id=28182")] public void TypeWithGenericMethodHavingArgumentBeingGenericArrayOfT() { var proxy = generator.CreateClassProxy(); diff --git a/src/Castle.Core.Tests/GenericInterfaceProxyTestCase.cs b/src/Castle.Core.Tests/GenericInterfaceProxyTestCase.cs index 1ea9ee68e6..862c53b74a 100644 --- a/src/Castle.Core.Tests/GenericInterfaceProxyTestCase.cs +++ b/src/Castle.Core.Tests/GenericInterfaceProxyTestCase.cs @@ -198,9 +198,6 @@ public void WithoutTarget() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInGenIfcGenMethodRefTypeNoTarget() { var interceptor = new KeepDataInterceptor(); @@ -218,9 +215,6 @@ public void MethodInfoClosedInGenIfcGenMethodRefTypeNoTarget() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInGenIfcGenMethodValueTypeNoTarget() { var interceptor = new KeepDataInterceptor(); @@ -266,9 +260,6 @@ public void MethodInfoClosedInGenIfcNongenMethodValueTypeNoTarget() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInNongenIfcGenMethodNoTarget() { var interceptor = new KeepDataInterceptor(); @@ -283,9 +274,6 @@ public void MethodInfoClosedInNongenIfcGenMethodNoTarget() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInGenIfcGenMethodRefTypeWithTarget() { var interceptor = new KeepDataInterceptor(); @@ -311,9 +299,6 @@ public void MethodInfoClosedInGenIfcGenMethodRefTypeWithTarget() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInGenIfcGenMethodValueTypeWithTarget() { var interceptor = new KeepDataInterceptor(); @@ -385,9 +370,6 @@ public void MethodInfoClosedInGenIfcNongenMethodValueTypeWithTarget() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void MethodInfoClosedInNongenIfcGenMethodWithTarget() { var interceptor = new KeepDataInterceptor(); diff --git a/src/Castle.Core.Tests/GenericMethodsProxyTestCase.cs b/src/Castle.Core.Tests/GenericMethodsProxyTestCase.cs index 40da4d6656..38d03f7cda 100644 --- a/src/Castle.Core.Tests/GenericMethodsProxyTestCase.cs +++ b/src/Castle.Core.Tests/GenericMethodsProxyTestCase.cs @@ -27,8 +27,6 @@ namespace Castle.DynamicProxy.Tests public class GenericMethodsProxyTestCase : BasePEVerifyTestCase { [Test] - [Platform(Exclude = "mono", Reason = "Assertion at sgen-alloc.c:460, condition `*p == NULL' not met. " + - "Fixed in https://bugzilla.xamarin.com/show_bug.cgi?id=28182")] public void GenericMethod_WithArrayOfGenericOfGenericArgument() { var proxy = generator.CreateClassProxy(); @@ -36,9 +34,6 @@ public void GenericMethod_WithArrayOfGenericOfGenericArgument() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void GenericMethod_WithConstraintOnOtherParameter() { var type = typeof(IInterfaceWithGenericMethodWithDependentConstraint); @@ -57,9 +52,6 @@ public void GenericMethod_WithConstraintOnOtherParameter() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void GenericMethod_WithConstraintOnSurroundingTypeParameter() { var type = typeof(IGenericInterfaceWithGenericMethodWithDependentConstraint); @@ -78,8 +70,6 @@ public void GenericMethod_WithConstraintOnSurroundingTypeParameter() } [Test] - [Platform(Exclude = "mono", Reason = "Assertion at sgen-alloc.c:460, condition `*p == NULL' not met. " + - "Fixed in https://bugzilla.xamarin.com/show_bug.cgi?id=28182")] public void GenericMethod_WithGenericOfGenericArgument() { var proxy = generator.CreateClassProxy(); diff --git a/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs b/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs index 92703a6369..dd7c4a0c0a 100644 --- a/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs +++ b/src/Castle.Core.Tests/InterceptorSelectorTestCase.cs @@ -48,9 +48,6 @@ public void BasicCase() } [Test] -#if __MonoCS__ - [Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")] -#endif public void SelectorWorksForGenericMethods() { var options = new ProxyGenerationOptions();