diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-08-29 14:54:06 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-08-29 14:54:06 +0200 |
commit | 5cf814404cec9a8702e4bfa88e0f9176fa04ecfb (patch) | |
tree | fabd44046e3e5b9aaac7f33b9e4dddaa8d3f06e8 /test/c/sha1.c | |
parent | 3208e22ea89c459a5a7944ad8e82511d4a5328fa (diff) | |
parent | 477f73ef96d957de5a896a05175ceaab7e0dce03 (diff) | |
download | compcert-5cf814404cec9a8702e4bfa88e0f9176fa04ecfb.tar.gz compcert-5cf814404cec9a8702e4bfa88e0f9176fa04ecfb.zip |
Merge branch 'master' into advanced-diagnostics
Diffstat (limited to 'test/c/sha1.c')
-rw-r--r-- | test/c/sha1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/c/sha1.c b/test/c/sha1.c index dff32a8e..3eab9b3d 100644 --- a/test/c/sha1.c +++ b/test/c/sha1.c @@ -178,7 +178,7 @@ static void do_test(unsigned char * txt, unsigned char * expected_output) SHA1_add_data(&ctx, txt, strlen((char *) txt)); SHA1_finish(&ctx, output); ok = memcmp(output, expected_output, 20) == 0; - printf("Test `%s': %s\n", + printf("Test `%s': %s\n", (char *) txt, (ok ? "passed" : "FAILED")); } @@ -197,7 +197,7 @@ unsigned char test_output_1[20] = { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E , 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D }; -unsigned char test_input_2[] = +unsigned char test_input_2[] = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; unsigned char test_output_2[20] = @@ -214,7 +214,7 @@ static void do_bench(int nblocks) for (i = 0; i < 64; i++) data[i] = i; SHA1_init(&ctx); - for (; nblocks > 0; nblocks--) + for (; nblocks > 0; nblocks--) SHA1_add_data(&ctx, data, 64); SHA1_finish(&ctx, output); } |