< prev index next >
test/compiler/intrinsics/sha/TestSHA.java
Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke
*** 25,54 ****
/**
* @test
* @bug 8035968
* @summary C2 support for SHA on SPARC
*
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-1 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-224 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-256 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-384 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-512 TestSHA
*
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-1 -Doffset=1 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-224 -Doffset=1 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-256 -Doffset=1 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-384 -Doffset=1 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-512 -Doffset=1 TestSHA
*
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-1 -Dalgorithm2=SHA-256 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-1 -Dalgorithm2=SHA-512 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-256 -Dalgorithm2=SHA-512 TestSHA
*
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=SHA-1 -Dalgorithm2=MD5 TestSHA
! * @run main/othervm/timeout=600 -Xbatch -Dalgorithm=MD5 -Dalgorithm2=SHA-1 TestSHA
*/
import java.security.MessageDigest;
import java.util.Arrays;
public class TestSHA {
private static final int HASH_LEN = 64; /* up to 512-bit */
--- 25,86 ----
/**
* @test
* @bug 8035968
* @summary C2 support for SHA on SPARC
*
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-1
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-224
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-256
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-384
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-512
! * compiler.intrinsics.sha.TestSHA
*
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-1 -Doffset=1
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-224 -Doffset=1
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-256 -Doffset=1
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-384 -Doffset=1
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-512 -Doffset=1
! * compiler.intrinsics.sha.TestSHA
*
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-1 -Dalgorithm2=SHA-256
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-1 -Dalgorithm2=SHA-512
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-256 -Dalgorithm2=SHA-512
! * compiler.intrinsics.sha.TestSHA
*
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=SHA-1 -Dalgorithm2=MD5
! * compiler.intrinsics.sha.TestSHA
! * @run main/othervm/timeout=600 -Xbatch
! * -Dalgorithm=MD5 -Dalgorithm2=SHA-1
! * compiler.intrinsics.sha.TestSHA
*/
+ package compiler.intrinsics.sha;
+
import java.security.MessageDigest;
import java.util.Arrays;
public class TestSHA {
private static final int HASH_LEN = 64; /* up to 512-bit */
*** 68,78 ****
if (algorithm2.equals("") == false) {
testSHA(provider, algorithm2, msgSize, offset, iters, warmupIters);
}
}
! static void testSHA(String provider, String algorithm, int msgSize,
int offset, int iters, int warmupIters) throws Exception {
System.out.println("provider = " + provider);
System.out.println("algorithm = " + algorithm);
System.out.println("msgSize = " + msgSize + " bytes");
System.out.println("offset = " + offset);
--- 100,110 ----
if (algorithm2.equals("") == false) {
testSHA(provider, algorithm2, msgSize, offset, iters, warmupIters);
}
}
! public static void testSHA(String provider, String algorithm, int msgSize,
int offset, int iters, int warmupIters) throws Exception {
System.out.println("provider = " + provider);
System.out.println("algorithm = " + algorithm);
System.out.println("msgSize = " + msgSize + " bytes");
System.out.println("offset = " + offset);
< prev index next >