Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / basic-vectors.cs
index 1830fd9a8bcddeb4c245c3108144956a7ba1633d..a2cf101450e792a1faf5177fdeb7e6b84ad06cbf 100644 (file)
@@ -717,7 +717,6 @@ public class VectorTests {
                return 0;
        }
 
-#if FALSE
        //
        // Vector<T>
        //
@@ -1045,10 +1044,17 @@ public class VectorTests {
        public static int test_0_vector_t_cast_vector_int32 () {
                var v1 = new Vector<long> (new long [] { 0x123456789abcdef0L, 0x23456789abcdef01L });
                var v = (Vector<int>)v1;
-               if ((uint)v [0] != 0x9abcdef0 || (uint)v [1] != 0x12345678)
-                       return 1;
-               if ((uint)v [2] != 0xabcdef01 || (uint)v [3] != 0x23456789)
-                       return 2;
+               if (BitConverter.IsLittleEndian) {
+                       if ((uint)v [0] != 0x9abcdef0 || (uint)v [1] != 0x12345678)
+                               return 1;
+                       if ((uint)v [2] != 0xabcdef01 || (uint)v [3] != 0x23456789)
+                               return 2;
+               } else {
+                       if ((uint)v [1] != 0x9abcdef0 || (uint)v [0] != 0x12345678)
+                               return 1;
+                       if ((uint)v [3] != 0xabcdef01 || (uint)v [2] != 0x23456789)
+                               return 2;
+               }
                return 0;
        }
 
@@ -1410,11 +1416,8 @@ public class VectorTests {
                try {
                        vector_copyto (v1, arr, 241);
                        return 1;
-               } catch (IndexOutOfRangeException) {
+               } catch (ArgumentException) {
                }
                return 0;
        }
-
-#endif
-
 }