diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-22 22:46:29 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-22 22:46:29 +0100 |
commit | f3fea9dbbbdea674a08d28a85afa197a5529b203 (patch) | |
tree | cfcaea4651febe3d9748396a2c7a16f8fee70425 /test | |
parent | b002697e19db546c3f7f70c7385f3106310e4579 (diff) | |
download | YAGE-f3fea9dbbbdea674a08d28a85afa197a5529b203.tar.gz YAGE-f3fea9dbbbdea674a08d28a85afa197a5529b203.zip |
Finished test bench
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); |