X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Farray.cs;h=7b3a68247a8f16df2176a2622b2b58b6a91615af;hb=ac1d494270ac25b3fd885ef7d8b52cb27109861d;hp=b0e9d47ff1e778425504e95dfd9e0c8307341fd6;hpb=00e065484e866f3a0349c882f804c4a79a13ee5c;p=mono.git diff --git a/mono/tests/array.cs b/mono/tests/array.cs index b0e9d47ff1e..7b3a68247a8 100644 --- a/mono/tests/array.cs +++ b/mono/tests/array.cs @@ -1,14 +1,10 @@ using System; +using System.Collections.Generic; using System.Runtime.InteropServices; public class Test { - static void puts (string s) - { - Console.WriteLine (s); - } - - public static int jagged () + public static int test_0_jagged () { int[][] j2 = new int [3][]; @@ -32,7 +28,7 @@ public class Test { return 0; } - public static int stest () + public static int test_0_stest () { string[] sa = new string[32]; @@ -44,13 +40,13 @@ public class Test { for (int i = 0; i < sa.Length; i++){ if (sa [i] != null) - puts (sa [i]); + Console.WriteLine (sa [i]); } return 0; } - public static int atest2 () + public static int test_0_atest2 () { int[,] ia = new int[32,32]; @@ -71,7 +67,7 @@ public class Test { return 0; } - public static int atest () + public static int test_0_atest () { int[] ia = new int[32]; @@ -93,35 +89,51 @@ public class Test { for (int i = 0; i )(object)x; + } catch (Exception e) { return 1; - puts ("e"); - if (jagged () != 0) - return 1; - - + } + try { + var y = (IList)(object)x; + } catch (Exception e) { + return 2; + } + + try { + var y = (ICollection)(object)x; + } catch (Exception e) { + return 3; + } + + try { + var y = (IEnumerable)(object)x; + } catch (Exception e) { + return 4; + } + + try { + var y = (IReadOnlyCollection)(object)x; + } catch (Exception e) { + return 5; + } return 0; } + + public static int Main (string[] args) { + return TestDriver.RunTests (typeof (Test), args); + } }