diff options
Diffstat (limited to 'test')
l--------- | test/.#matrixtest.cpp | 1 | ||||
-rw-r--r-- | test/testbench.cpp | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/test/.#matrixtest.cpp b/test/.#matrixtest.cpp deleted file mode 120000 index a5af3c6f..00000000 --- a/test/.#matrixtest.cpp +++ /dev/null @@ -1 +0,0 @@ -yannherklotz@yann-arch.18525:1497988195
\ No newline at end of file diff --git a/test/testbench.cpp b/test/testbench.cpp index 6b2a6084..9995e5c0 100644 --- a/test/testbench.cpp +++ b/test/testbench.cpp @@ -34,6 +34,7 @@ void TestBench::endTest(bool pass) void TestBench::printResults() { + printf("Results:\n"); printf("+------------+---------+\n"); printf("| Test Name | Result |\n"); printf("+------------+---------+\n"); @@ -44,11 +45,21 @@ void TestBench::printResults() result="PASS"; else result="FAIL"; + + char test_name[10]; + + for(std::size_t i=0; i<10; ++i) + { + if(i<test.name.size()) + test_name[i]=test.name[i]; + else + test_name[i]=' '; + } - printf("| %10s | %6s |\n", test.name.c_str(), result.c_str()); + printf("| %10.10s | %6s |\n", test_name, result.c_str()); } printf("+------------+---------+\n"); - printf("\n"); + printf("\nSummary:\n"); printf("+--------+--------+\n"); printf("| Passed | %6d |\n", passed); printf("| Failed | %6d |\n", failed); |