diff options
author | Jb Evain <jbevain@gmail.com> | 2015-08-28 11:02:26 +0300 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2015-08-28 11:02:26 +0300 |
commit | 0c0de8bfe6eb234b210764cb09742ab18d4fb4fb (patch) | |
tree | 35013abf36d900d7543ce90381ad7d1efcca1ab7 | |
parent | 06add0abde4e61974e146e6d91fd0aad32f41fc6 (diff) |
Fix testing of CA empty blob on Mono
-rw-r--r-- | Test/Mono.Cecil.Tests/CustomAttributesTests.cs | 4 | ||||
-rw-r--r-- | Test/Resources/il/ca-empty-blob.il | 21 | ||||
-rw-r--r-- | Test/Resources/il/types.il | 12 |
3 files changed, 23 insertions, 14 deletions
diff --git a/Test/Mono.Cecil.Tests/CustomAttributesTests.cs b/Test/Mono.Cecil.Tests/CustomAttributesTests.cs index 5a1d4b6..5af0467 100644 --- a/Test/Mono.Cecil.Tests/CustomAttributesTests.cs +++ b/Test/Mono.Cecil.Tests/CustomAttributesTests.cs @@ -404,11 +404,11 @@ namespace Mono.Cecil.Tests { [Test] public void EmptyBlob () { - TestIL ("types.il", module => { + TestIL ("ca-empty-blob.il", module => { var attribute = module.GetType ("CustomAttribute"); Assert.AreEqual (1, attribute.CustomAttributes.Count); Assert.AreEqual (0, attribute.CustomAttributes [0].ConstructorArguments.Count); - }); + }, verify: !Platform.OnMono); } [Test] diff --git a/Test/Resources/il/ca-empty-blob.il b/Test/Resources/il/ca-empty-blob.il new file mode 100644 index 0000000..2d3d780 --- /dev/null +++ b/Test/Resources/il/ca-empty-blob.il @@ -0,0 +1,21 @@ +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89) + .ver 2:0:0:0 +} + +.assembly CaEmptyBlob {} + +.module CaEmptyBlob.dll + +.class public auto ansi CustomAttribute extends [mscorlib]System.Attribute +{ + .custom instance void CustomAttribute::.ctor() = () + + .method public hidebysig specialname rtspecialname instance void .ctor() + { + ldarg.0 + call instance void [mscorlib]System.Attribute::.ctor() + ret + } +} diff --git a/Test/Resources/il/types.il b/Test/Resources/il/types.il index b230c21..4c9acaf 100644 --- a/Test/Resources/il/types.il +++ b/Test/Resources/il/types.il @@ -44,15 +44,3 @@ .field private static literal int16 int16_char = char(0x0073) .field private static literal int32 int32_nullref = nullref } - -.class public auto ansi CustomAttribute extends [mscorlib]System.Attribute -{ - .custom instance void CustomAttribute::.ctor() = () - - .method public hidebysig specialname rtspecialname instance void .ctor() - { - ldarg.0 - call instance void [mscorlib]System.Attribute::.ctor() - ret - } -} |