diff options
author | Marek Safar <marek.safar@gmail.com> | 2008-10-01 19:04:19 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2008-10-01 19:04:19 +0400 |
commit | 577c91719f73145528dea43940db2aaa018d9936 (patch) | |
tree | 9f9a187e09f69cd5ec9ba87366a75e9646739cb1 /mcs/tests/gtest-418.cs | |
parent | b7e74999f81ee2a76aee2d0d758f3b7f01a6407f (diff) |
New test.
svn path=/trunk/mcs/; revision=114572
Diffstat (limited to 'mcs/tests/gtest-418.cs')
-rwxr-xr-x | mcs/tests/gtest-418.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mcs/tests/gtest-418.cs b/mcs/tests/gtest-418.cs new file mode 100755 index 00000000000..7ed88aa75a5 --- /dev/null +++ b/mcs/tests/gtest-418.cs @@ -0,0 +1,42 @@ +using System; +using System.Reflection; + +namespace N +{ + class Nested + { + public interface I<T> + { + T P { get; } + } + + public class C : I<int> + { + int I<int>.P + { + get { return 2; } + } + } + } + + class M + { + public static int Main () + { + int count = 0; + foreach (MethodInfo method in typeof (Nested.C).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic)) { + Console.WriteLine (method.Name); + if (method.Name == "N.Nested.I<int>.get_P") + ++count; + } + + foreach (PropertyInfo pi in typeof (Nested.C).GetProperties (BindingFlags.Instance | BindingFlags.NonPublic)) { + Console.WriteLine (pi.Name); + if (pi.Name == "N.Nested.I<int>.P") + count += 2; + } + + return 3 - count; + } + } +} |