Skip to content

Commit

Permalink
Upgrade to Mono 4.0.2
Browse files Browse the repository at this point in the history
Re-enable unit tests that now work in 4.0.2 and declare the minimum
supported Mono version as 4.0.2.
  • Loading branch information
jonorossi committed Jul 13, 2015
1 parent 9830b04 commit fc7b91b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 64 deletions.
8 changes: 3 additions & 5 deletions README.md
Expand Up @@ -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

Expand All @@ -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
```
Expand Down
Expand Up @@ -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(
Expand Down
28 changes: 3 additions & 25 deletions src/Castle.Core.Tests/GenericClassProxyTestCase.cs
Expand Up @@ -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<ClassWithMethodWithReturnArrayOfListOfT>();
Expand All @@ -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<List<object>> proxy =
Expand All @@ -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<List<object>> proxy =
Expand All @@ -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<List<object>> proxy =
Expand Down Expand Up @@ -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 =
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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<MethodWithArgumentBeingArrayOfGenericTypeOfT>();
Expand Down
18 changes: 0 additions & 18 deletions src/Castle.Core.Tests/GenericInterfaceProxyTestCase.cs
Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
10 changes: 0 additions & 10 deletions src/Castle.Core.Tests/GenericMethodsProxyTestCase.cs
Expand Up @@ -27,18 +27,13 @@ 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<ClassWithMethodWithArrayOfListOfT>();
proxy.GenericMethodWithListArrayArgument<string>(null);
}

[Test]
#if __MonoCS__
[Ignore("System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation")]
#endif
public void GenericMethod_WithConstraintOnOtherParameter()
{
var type = typeof(IInterfaceWithGenericMethodWithDependentConstraint);
Expand All @@ -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<object>);
Expand All @@ -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<ClassWithMethodWithGenericOfGenericOfT>();
Expand Down
3 changes: 0 additions & 3 deletions src/Castle.Core.Tests/InterceptorSelectorTestCase.cs
Expand Up @@ -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();
Expand Down

0 comments on commit fc7b91b

Please sign in to comment.