2009-01-24 Zoltan Varga <vargaz@gmail.com>
[mcs.git] / tests / test-590.cs
blobf2b2bd03ebc8a73817c6fd4b8f458840a5313790
1 using System;
3 class X
5 static int Main ()
7 X x = new X ();
8 return x.Do ("a", "b", "c");
11 string str = "start";
13 string Foo ()
15 return "s";
18 string Prop
20 get { return str; }
21 set { str = value; }
24 string this [int i]
26 get { return str; }
27 set { str = value; }
30 int Do (string a, string b, string c)
32 str += Foo ();
33 if (str != "starts")
34 return 1;
36 str += a + "," + b + "," + c;
37 if (str != "startsa,b,c")
38 return 2;
40 Prop += a;
41 if (str != "startsa,b,ca")
42 return 3;
44 Prop += a + "," + b + "," + c;
45 if (str != "startsa,b,caa,b,c")
46 return 4;
48 this [0] += a + "," + b + "," + c;
49 if (str != "startsa,b,caa,b,ca,b,c")
50 return 5;
52 return 0;