2002-07-19 Martin Baulig <martin@gnome.org>
[mono.git] / mcs / tests / test-34.cs
index 06f8518a201c969136c9f68bb18ac62eb108fa07..44a9fca10ca2cdecc82062581334740ab22ea2f3 100644 (file)
@@ -30,6 +30,26 @@ public class Blah {
                got = 3;
        }
 
+       static void In (ref int a)
+       {
+               a++;
+       }
+
+       static void Out (ref int a)
+       {
+               In (ref a);
+       }
+
+       static int AddArray (params int [] valores)
+       {
+               int total = 0;
+               
+               for (int i = 0; i < valores.Length; i++)
+                       total += valores [i];
+
+               return total;
+       }
+       
        public static int Main ()
        {
                int i = 1;
@@ -54,6 +74,17 @@ public class Blah {
                if (got != 2)
                        return 3;
 
+               int k = 10;
+
+               Out (ref k);
+               if (k != 11)
+                       return 10;
+
+               int [] arr2 = new int [2] {1, 2};
+
+               if (AddArray (arr2) != 3)
+                       return 11;
+               
                return  0;
        }
 }