Changed main.c back to normal run mode from testing

Signed-off-by: gothictomato <gothictomato@pm.me>
This commit is contained in:
gothictomato
2022-07-18 12:46:04 -04:00
parent b5551c4fc9
commit 1d938273f3

View File

@@ -6,10 +6,19 @@
i32 runTests() {
i32 res = runuf20();
if (res != 0) return res;
if (res != 0) {
printf("Failed tests in uf20\n");
return res;
}
res = runuf50();
if (res != 0) return res;
if (res != 0) {
printf("Failed tests in uf50\n");
return res;
}
res = runuuf50();
if (res != 0) {
printf("Failed tests in uuf50\n");
}
return res;
}
@@ -36,6 +45,8 @@ i32 runuf20() {
}
printf("Passed %u / 1000 tests\n", passed);
printf("Took %lf s total, %lf s on avg\n", ((f64) tottime) / 1000000.0, ((f64) tottime) / 1000000000.0);
if (passed == 1000) return 0;
return 1;
}
i32 runuf50() {
@@ -60,6 +71,8 @@ i32 runuf50() {
}
printf("Passed %u / 1000 tests\n", passed);
printf("Took %lf s total, %lf s on avg\n", ((f64) tottime) / 1000000.0, ((f64) tottime) / 1000000000.0);
if (passed == 1000) return 0;
return 1;
}
i32 runuuf50() {
@@ -80,8 +93,10 @@ i32 runuuf50() {
tottime += (stop - start);
freecnf(c);
if (res == 0) passed++;
if (res == 1) passed++;
}
printf("Passed %u / 1000 tests\n", passed);
printf("Took %lf s total, %lf s on avg\n", ((f64) tottime) / 1000000.0, ((f64) tottime) / 1000000000.0);
if (passed == 1000) return 0;
return 1;
}