1.1 --- a/samples/messagedigest/src-test/test/NewAPIToOldAPITest.java Sat Jun 14 09:52:23 2008 +0200
1.2 +++ b/samples/messagedigest/src-test/test/NewAPIToOldAPITest.java Thu Oct 30 21:30:10 2014 +0100
1.3 @@ -1,8 +1,3 @@
1.4 -/*
1.5 - * To change this template, choose Tools | Templates
1.6 - * and open the template in the editor.
1.7 - */
1.8 -
1.9 package test;
1.10
1.11 import java.nio.ByteBuffer;
1.12 @@ -50,6 +45,7 @@
1.13
1.14 @Test
1.15 public void generateHashUsingNewDigest() throws Exception {
1.16 + if (Boolean.getBoolean("no.failures") && Boolean.getBoolean("no.md5")) return;
1.17 Digest d = Digest.getInstance("MD5");
1.18 ByteBuffer bb = ByteBuffer.wrap(arr);
1.19 byte[] res = d.digest(bb);
1.20 @@ -58,6 +54,7 @@
1.21
1.22 @Test
1.23 public void compareTheHashes() throws Exception {
1.24 + if (Boolean.getBoolean("no.failures") && Boolean.getBoolean("no.md5")) return;
1.25 if (!Arrays.equals(resOld, resNew)) {
1.26 fail("Arrays are different:\n" + Arrays.toString(resOld) + "\n" + Arrays.toString(resNew));
1.27 }