Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-590.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8390178dfe7d8e12ddb0327b3204cea83931a56d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;

class X
{
	public static int Main ()
	{
		X x = new X ();
		return x.Do ("a", "b", "c");
	}

	string str = "start";

	string Foo ()
	{
		return "s";
	}

	string Prop
	{
		get { return str; }
		set { str = value; }
	}

	string this [int i]
	{
		get { return str; }
		set { str = value; }
	}

	int Do (string a, string b, string c)
	{
		str += Foo ();
		if (str != "starts")
			return 1;

		str += a + "," + b + "," + c;
		if (str != "startsa,b,c")
			return 2;

		Prop += a;
		if (str != "startsa,b,ca")
			return 3;

		Prop += a + "," + b + "," + c;
		if (str != "startsa,b,caa,b,c")
			return 4;

		this [0] += a + "," + b + "," + c;
		if (str != "startsa,b,caa,b,ca,b,c")
			return 5;

		return 0;
	}
}