Merge pull request #24 from altendky/separate_test_and_main

Separate test function and main()
main
Jean-Philippe Aumasson 2019-09-22 06:15:18 -04:00 committed by GitHub
commit 566f3f9c0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
CC=gcc CC=gcc
CFLAGS=-Wall --std=c99 CFLAGS=-Wall --std=c99
SRC=siphash.c halfsiphash.c test.c SRC=siphash.c halfsiphash.c test.c testmain.c
BIN=test debug vectors BIN=test debug vectors
ifneq ($(cROUNDS),) ifneq ($(cROUNDS),)

2
test.c
View File

@ -43,7 +43,7 @@ const char *labels[4] = {
size_t lengths[4] = {8, 16, 4, 8}; size_t lengths[4] = {8, 16, 4, 8};
int main() { int siphash_test() {
uint8_t in[64], out[16], k[16]; uint8_t in[64], out[16], k[16];
int i; int i;
#ifndef GETVECTORS #ifndef GETVECTORS

5
testmain.c 100644
View File

@ -0,0 +1,5 @@
int siphash_test();
int main(void) {
return siphash_test();
}