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
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2016-09-21 13:53:12 +0300
committerMarek Safar <marek.safar@gmail.com>2016-09-21 13:54:08 +0300
commit76f97e30731d6c98f21771b516b78399185c1c51 (patch)
tree1b98790318bebb10b518701de796124d11b67d30 /mcs/tests/test-254.cs
parent87dfebcb22c41b1577210d7fe532817c55112eaa (diff)
[mcs] Add compilergenerated attribute for private event backing fields to match newer csc
Diffstat (limited to 'mcs/tests/test-254.cs')
-rw-r--r--mcs/tests/test-254.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/mcs/tests/test-254.cs b/mcs/tests/test-254.cs
index 1971d2f4e48..36453ea86b3 100644
--- a/mcs/tests/test-254.cs
+++ b/mcs/tests/test-254.cs
@@ -1,5 +1,6 @@
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
[assembly: Test]
@@ -130,7 +131,8 @@ public class ClassMain
Assert (ei.GetRemoveMethod ().GetCustomAttributes (true), false, 44);
Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), false, 45);
FieldInfo fi = typeof(Test_3).GetField ("e_1", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
- Assert (fi.GetCustomAttributes (true), true, 46);
+ Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 46);
+ Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), true, 47);
ei = typeof(Test_3).GetEvent ("e_2");
Assert (ei.GetCustomAttributes (true), false, 51);
@@ -139,7 +141,8 @@ public class ClassMain
Assert (ei.GetRemoveMethod ().GetCustomAttributes (true), true, 54);
Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), false, 55);
fi = typeof(Test_3).GetField ("e_2", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
- Assert (fi.GetCustomAttributes (true), false, 56);
+ Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 56);
+ Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), false, 57);
ei = typeof(Test_4).GetEvent ("e_2");
Assert (ei.GetCustomAttributes (true), false, 71);
@@ -148,7 +151,8 @@ public class ClassMain
Assert (ei.GetRemoveMethod ().GetCustomAttributes (true), false, 74);
Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), true, 75);
fi = typeof(Test_3).GetField ("e_2", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
- Assert (fi.GetCustomAttributes (true), false, 76);
+ Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 76);
+ Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), false, 77);
ei = typeof(Test_4).GetEvent ("e_3");
Assert (ei.GetCustomAttributes (true), false, 81);
@@ -159,7 +163,8 @@ public class ClassMain
Assert (ei.GetRemoveMethod ().ReturnTypeCustomAttributes.GetCustomAttributes (true), false, 86);
Assert (ei.GetRemoveMethod ().GetParameters ()[0].GetCustomAttributes (true), true, 87);
fi = typeof(Test_3).GetField ("e_2", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
- Assert (fi.GetCustomAttributes (true), false, 88);
+ Assert (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), true), true, 86);
+ Assert (fi.GetCustomAttributes (typeof (TestAttribute), true), false, 87);
return failed ? 1 : 0;
}