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

test-880.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: acb4a4d5a862c1fde5915d163dfa9b7f3149387e (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
using System;

public class A
{
	public static void Main ()
	{
	}

	static void Test1 ()
	{
		int a;
		bool r = false;

		if (r && (a = 1) > 0 && r) {
			System.Console.WriteLine (a);
		}
	}

	static void Test2 ()
	{
		int a;
		var res = (a = 1) > 0 || Call (a);
	}

	static void Test3 ()
	{
		int a;
		if ((a = 1) > 0 || Call (a))
			return;
	}

	static void Test4 ()
	{
		int version1;
		bool r = false;
		if (r || !OutCall (out version1) || version1 == 0 || version1 == -1)
		{
			throw new ArgumentException();
		}
	}

	static void Test5 ()
	{
		bool r = false;
		int t1;
		if (Foo (r ? Call (1) : Call (4), OutCall (out t1)))
			Console.WriteLine (t1);
	}

	static void Test6 ()
	{
		int b = 0;
		var res = b != 0 && b.ToString () != null;
	}

	static bool Test7 ()
	{
		int f = 1;
		int g;
		return f > 1 && OutCall (out g) && g > 1;
	}

	static void Test8 ()
	{
		bool x = true;

		int a;
		if (x ? OutCall (out a) : OutCall (out a))
			System.Console.WriteLine (a);
		else
			System.Console.WriteLine (a);
	}

	static bool OutCall (out int arg)
	{
		arg = 1;
		return false;
	}
	
	static bool Call (int arg)
	{
		return false;
	}

	static bool Foo (params object[] arg)
	{
		return false;
	}
}