[test] SRE ILGenerator test for methodref and fieldref token caching
authorAleksey Kliger <aleksey@xamarin.com>
Thu, 28 Sep 2017 20:24:30 +0000 (16:24 -0400)
committerMarek Safar <marek.safar@gmail.com>
Fri, 29 Sep 2017 09:01:31 +0000 (11:01 +0200)
commitd0ad7e2df9bf67d11cd0164d39916f4659e606f1
treef57e42340133ff3e68cc9af07ed295efd221eb37
parente3685c4c9aad38851097cff877dc0fb7ed47ab10
[test] SRE ILGenerator test for methodref and fieldref token caching

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=59364

We need to cause SRE to generate the same methodref/fieldref token from two
different reflection objects.  That happens if you get the same method or field
via a base and a derived class so that the MemberInfo:DeclaredType is different
but the underlying MonoMethod* or MonoClassField* is the same.
mcs/class/corlib/Test/System.Reflection.Emit/ILGeneratorTest.cs