eol
[mcs.git] / tests / test-606.cs
blobc9bed59a6e22be98205eb1ba883a45deb43863b8
1 using System;
2 using System.Collections;
3 using System.Reflection;
5 using Mono.Test;
7 class Program
9 static int Main ()
11 BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance |
12 BindingFlags.DeclaredOnly;
13 Type type = typeof (Info);
15 PropertyInfo [] properties = type.GetProperties (flags);
16 if (properties.Length != 2) {
17 Console.WriteLine ("#1: " + properties.Length.ToString ());
18 return 1;
20 if (properties [0].Name != "System.Collections.IEnumerator.Current") {
21 Console.WriteLine ("#2: " + properties [0].Name);
22 return 2;
25 if (properties [1].Name != "Mono.Test.ITest.Item") {
26 Console.WriteLine ("#3: " + properties [1].Name);
27 return 3;
30 return 0;
34 namespace Mono.Test
36 interface ITest
38 object this [int index]
40 get;
41 set;
46 class Info : IEnumerator, ITest
48 object IEnumerator.Current
50 get { return null; }
53 bool IEnumerator.MoveNext ()
55 return false;
58 void IEnumerator.Reset ()
62 object ITest.this [int index]
64 get { return null; }
65 set { }