[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git] / mcs / tests / test-606.cs
blob466d14e8e3d7d366caf32a54231e06e85954bc62
1 using System;
2 using System.Collections;
3 using System.Reflection;
5 using Mono.Test;
7 class Program
9 public 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 { }