Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorAlexander Kyte <alexmkyte@gmail.com>2018-01-22 21:03:11 +0300
committerMarek Safar <marek.safar@gmail.com>2018-01-23 16:37:12 +0300
commit49d2d5ae51fe5a34e589f6db8191314638c8ac0c (patch)
treeaef4cabe95f92354d5693fbeb2ad6db000445d58 /mcs
parent36ad3953683113071370f1c93aa593a5b23d3106 (diff)
[tests] Fix cscs/mcs specific GetMethodBody logic
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
index 6a22ea1c638..c68116ea0ee 100644
--- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
@@ -431,8 +431,10 @@ namespace MonoTests.System.Reflection
Assert.IsFalse (lvi.IsPinned, "#3-1");
if (/* mcs */ lvi.LocalType == typeof (byte*) || /* csc */ lvi.LocalType == typeof (byte).MakeByRefType ()) {
- foundPinnedBytePointer = true;
- Assert.IsTrue (lvi.IsPinned, "#3-2");
+ // We have three locals. There's b the byte[], there's a byte* and there's a byte&.
+ // mcs emits a byte* for the latter type.
+ // We need to find one such pinned byte pointer. Therefore we're folding with logical or
+ foundPinnedBytePointer = foundPinnedBytePointer || lvi.IsPinned;
}
}
}