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

test-18.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97c25bfca23e7a6c372ff7ce8889dc0f3e0e002a (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
using System;

class X {
	static int i;
	static int j;
	
	static void m ()
	{
		i = 0;
		j = 0;
		
		try {
			throw new ArgumentException ("Blah");
		} catch (ArgumentException){
			i = 1;
		} catch (Exception){
			i = 2;
		} finally {
			j = 1;
		}
	}

	static int ret (int a)
	{
		try {
			if (a == 1)
				throw new Exception ();
			
			return 1;
		} catch {
			return 2;
		}
	}
	
	public static int Main ()
	{
		m ();
		if (i != 1)
			return 1;
		if (j != 1)
			return 2;

		if (ret (1) != 2)
			return 3;

		if (ret (10) != 1)
			return 4;
		
		return 0;
	}
}