8181145: add platforms to test java/nio/ByteOrder/NativeOrder.java
Reviewed-by: martin, mdoerr
--- 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");
}
}