aboutsummaryrefslogtreecommitdiff
path: root/tests/cavp-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cavp-tests')
-rwxr-xr-xtests/cavp-tests/gen-main.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/cavp-tests/gen-main.rb b/tests/cavp-tests/gen-main.rb
index 5d73554..312262e 100755
--- a/tests/cavp-tests/gen-main.rb
+++ b/tests/cavp-tests/gen-main.rb
@@ -123,7 +123,7 @@ SETS = [{
}],
}]
-# header for main.c
+# main.c header
MAIN_HEAD = <<END_MAIN_HEAD
// Run test vectors for FIPS202 hash functions and XOFs.
// (generated by `gen-main.rb`)
@@ -134,6 +134,7 @@ MAIN_HEAD = <<END_MAIN_HEAD
#include "hex.h" // hex_write()
#include "sha3.h"
+// test failure
typedef struct {
const char *test_fn; // test function name
size_t test_i; // test case index
@@ -145,7 +146,7 @@ typedef struct {
size_t exp_len; // expected result length
} failure_t;
-// print failure
+// print failure
static void fail(FILE *fh, const failure_t f) {
fprintf(fh, "test_fn = %s\\n", f.test_fn);
fprintf(fh, "rsp_file = %s\\n", f.rsp_file);
@@ -158,7 +159,7 @@ static void fail(FILE *fh, const failure_t f) {
}
END_MAIN_HEAD
-# template for footer of main.c
+# main.c footer template
MAIN_TAIL_TMPL = <<END_MAIN_TAIL_TMPL
int main(void) {
%<fns>s
@@ -203,7 +204,7 @@ static void test_%<fn>s(void) {
// hash data into "got"
uint8_t got[%<max_exp_len>d] = { 0 };
- %<fn>s_xof_once(DATA + TESTS[i].src_ofs, TESTS[i].src_len, got, exp_len);
+ %<fn>s(DATA + TESTS[i].src_ofs, TESTS[i].src_len, got, exp_len);
// check for expected result
if (memcmp(got, exp, exp_len)) {