Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tests / test-68.cs
1 //
2 // Tests invocation of reference type functions with value type arguments
3 //
4 using System;
5 enum A {
6         Hello
7 }
8
9 class Y {
10         public Y ()
11         {
12                 value = 3;
13         }
14         public int value;
15 }
16
17 class X {
18
19         public static int Main ()
20         {
21                 if ("Hello" != A.Hello.ToString ())
22                         return 1;
23
24                 Console.WriteLine ("value is: " + (5.ToString ()));
25                 if (5.ToString () != "5")
26                         return 2;
27
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;               
33                 }
34                 Console.WriteLine ("Test ok");
35                 return 0;
36         }
37 }
38