8181145: add platforms to test java/nio/ByteOrder/NativeOrder.java
authormbaesken
Fri, 26 May 2017 16:35:45 +0200
changeset 45284 f80c912ae287
parent 45283 fcb2af038805
child 45285 7f8db2139152
child 46868 6f845fa89b62
8181145: add platforms to test java/nio/ByteOrder/NativeOrder.java Reviewed-by: martin, mdoerr
jdk/test/java/nio/ByteOrder/NativeOrder.java
--- a/jdk/test/java/nio/ByteOrder/NativeOrder.java	Fri May 26 22:53:26 2017 -0700
+++ b/jdk/test/java/nio/ByteOrder/NativeOrder.java	Fri May 26 16:35:45 2017 +0200
@@ -32,12 +32,19 @@
 
     public static void main(String[] args) throws Exception {
         ByteOrder bo = ByteOrder.nativeOrder();
-        System.err.println(bo);
+        System.err.println("ByteOrder.nativeOrder:" + bo);
         String arch = System.getProperty("os.arch");
+        System.err.println("os.arch:" + arch);
         if (((arch.equals("i386") && (bo != ByteOrder.LITTLE_ENDIAN))) ||
+            ((arch.equals("amd64") && (bo != ByteOrder.LITTLE_ENDIAN))) ||
+            ((arch.equals("x86_64") && (bo != ByteOrder.LITTLE_ENDIAN))) ||
+            ((arch.equals("ppc64") && (bo != ByteOrder.BIG_ENDIAN))) ||
+            ((arch.equals("ppc64le") && (bo != ByteOrder.LITTLE_ENDIAN))) ||
+            ((arch.equals("s390x") && (bo != ByteOrder.BIG_ENDIAN))) ||
             ((arch.equals("sparc") && (bo != ByteOrder.BIG_ENDIAN)))) {
             throw new Exception("Wrong byte order");
         }
+        System.err.println("test is OK");
     }
 
 }