/* * Random tests with one input vector of size 4: n = number of tests */ static void random_tests4(uint32_t n, void (*f)(uint32_t, literal_t *)) { literal_t a[4]; uint32_t i; printf("Size 4:\n"); init_random(12); while (n > 0) { for (i=0; i<4; i++) { a[i] = pick(12); } f(4, a); refresh_random(12); n --; } printf("\n"); }
/* * Random tests: two 6bit vectors, n = number of tests */ static void random_test6(uint32_t n, void (*f)(uint32_t, literal_t *, literal_t *)) { literal_t a[6]; literal_t b[6]; uint32_t i; printf("Size 6:\n"); init_random(20); while (n > 0) { for (i=0; i<6; i++) { a[i] = pick(20); b[i] = pick(20); } f(6, a, b); refresh_random(20); n --; } printf("\n"); }