From 1d938273f37f78a2a1229c8052544b29bc1ce21d Mon Sep 17 00:00:00 2001 From: gothictomato Date: Mon, 18 Jul 2022 12:46:04 -0400 Subject: [PATCH] Changed main.c back to normal run mode from testing Signed-off-by: gothictomato --- tests/masterTest.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/masterTest.c b/tests/masterTest.c index 6a7af0f..2868e17 100644 --- a/tests/masterTest.c +++ b/tests/masterTest.c @@ -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; } \ No newline at end of file