From e1a3ef37d4e1e5fe81b4f10aba132c07a532c600 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 17 Jun 2018 19:47:46 +0200 Subject: [PATCH] Faster crypto_verify*() tests There was no need to test every possible value to catch the errors the tests caugth. Cutting them down makes the test 64000 times faster, which matters quite a lot when we run the TIS interpreter. The new tests catch just as many errors as the old ones. --- tests/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test.c b/tests/test.c index 9397ea1..8722e6e 100644 --- a/tests/test.c +++ b/tests/test.c @@ -247,8 +247,8 @@ static int p_verify(size_t size, int (*compare)(const u8*, const u8*)) int status = 0; u8 a[64]; // size <= 64 u8 b[64]; // size <= 64 - FOR (i, 0, 256) { - FOR (j, 0, 256) { + FOR (i, 0, 2) { + FOR (j, 0, 2) { // Set every byte to the chosen value, then compare FOR (k, 0, size) { a[k] = i; -- 2.47.3