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

test-68.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d61be1d101446b14d77a61967b97e26271eaf30d (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
//
// Tests invocation of reference type functions with value type arguments
//
using System;
enum A {
	Hello
}

class Y {
	public Y ()
	{
		value = 3;
	}
	public int value;
}

class X {

	public static int Main ()
	{
		if ("Hello" != A.Hello.ToString ())
			return 1;

		Console.WriteLine ("value is: " + (5.ToString ()));
		if (5.ToString () != "5")
			return 2;

		Y y = new Y ();
		if (y.value.ToString () != "3"){
			string x = y.value.ToString ();
			Console.WriteLine ("Got: {0} expected 3", x);
			return 3;		
		}
		Console.WriteLine ("Test ok");
		return 0;
	}
}