Fixes inversion test due missing RAID init call.

This commit is contained in:
Andrea Mazzoleni 2014-09-17 21:35:13 +02:00
parent 4ce85be912
commit 3a798cb226
2 changed files with 8 additions and 4 deletions

View file

@ -22,6 +22,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
/**
* Like raid_invert() but optimized to only check if the matrix is
@ -120,7 +121,7 @@ static __always_inline int test_sub_matrix(int nr, long long *total)
if (count != expected)
return -1;
printf("\rTested %lld matrix\n", count);
printf("\rTested %"PRIi64" matrix\n", count);
*total += count;
@ -152,7 +153,7 @@ int test_all_sub_matrix(void)
if (test_sub_matrix(6, &total) != 0)
return -1;
printf("\nTested in total %lld matrix\n", total);
printf("\nTested in total %"PRIi64" matrix\n", total);
return 0;
}
@ -161,6 +162,9 @@ int main(void)
{
printf("Matrix inversion test for the RAID Cauchy library\n\n");
/* required to set the gfgen table */
raid_init();
if (test_all_sub_matrix() != 0) {
printf("FAILED!\n");
exit(EXIT_FAILURE);