2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / tests / test-68.cs
blob8514c9413593d4613f3c84473f112c9c7cf92825
1 //
2 // Tests invocation of reference type functions with value type arguments
3 //
4 using System;
5 enum A {
6 Hello
9 class Y {
10 public Y ()
12 value = 3;
14 public int value;
17 class X {
19 static int Main ()
21 if ("Hello" != A.Hello.ToString ())
22 return 1;
24 Console.WriteLine ("value is: " + (5.ToString ()));
25 if (5.ToString () != "5")
26 return 2;
28 Y y = new Y ();
29 if (y.value.ToString () != "3"){
30 string x = y.value.ToString ();
31 Console.WriteLine ("Got: {0} expected 3", x);
32 return 3;
34 Console.WriteLine ("Test ok");
35 return 0;