changeset 45284:f80c912ae287

8181145: add platforms to test java/nio/ByteOrder/NativeOrder.java Reviewed-by: martin, mdoerr
author mbaesken
date Fri, 26 May 2017 16:35:45 +0200
parents fcb2af038805
children 7f8db2139152 6f845fa89b62
files jdk/test/java/nio/ByteOrder/NativeOrder.java
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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");
     }
 
 }