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

test-783.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 93e24821d8bd104d281b62a9b28e52c32f0d5a7e (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
enum E { a, b }

class C
{
	static void M (E e)
	{
	}
	
	static int Test (int a)
	{
		return -1;
	}
	
	static int Test (E e)
	{
		return 1;
	}
	
	public static int Main ()
	{
		M ((uint) 0);
		M ((long) 0);
		M ((sbyte) 0);
		M ((ulong) 0);
		
		var d = E.b;
		if (Test (d - 0) != 1)
			return 1;
		
		if (Test (d - 1) != 1)
			return 2;

		if (Test (d + 0) != 1)
			return 3;

		if (Test (d + 1) != 1)
			return 4;
		
		return 0;
	}
}