Skip to content

Commit a23a5e5

Browse files
committed
further test random test pruning.
1 parent 784fa1d commit a23a5e5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/src/test/java/org/bouncycastle/pqc/crypto/test/RainbowVectorTest.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.io.InputStream;
55
import java.io.InputStreamReader;
66
import java.util.HashMap;
7+
import java.util.Random;
78

89
import junit.framework.TestCase;
910
import org.bouncycastle.crypto.AsymmetricCipherKeyPair;
@@ -43,6 +44,9 @@ public void testVectors()
4344
};
4445

4546
TestSampler sampler = new TestSampler();
47+
Random rd = new Random(System.currentTimeMillis());
48+
49+
int offSet = rd.nextInt(10);
4650

4751
for (int fileIndex = 0; fileIndex != files.length; fileIndex++)
4852
{
@@ -66,11 +70,15 @@ public void testVectors()
6670
if (buf.size() > 0)
6771
{
6872
String count = (String)buf.get("count");
69-
if (sampler.skipTest(count))
73+
// if (sampler.skipTest(count))
74+
// {
75+
// continue;
76+
// }
77+
78+
if (Integer.parseInt(count) != offSet)
7079
{
7180
continue;
7281
}
73-
7482
// System.out.println("test case: " + count);
7583
byte[] seed = Hex.decode((String)buf.get("seed")); // seed for Rainbow secure random
7684
int mlen = Integer.parseInt((String)buf.get("mlen")); // message length

0 commit comments

Comments
 (0)