diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-23 07:30:06 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-23 07:30:06 +0100 |
commit | 884c915340b86e162df9bdff9f67ae25407cbaab (patch) | |
tree | 4694856cde2a28db4820a61f4a9729a87eb200d5 /test | |
parent | f3fea9dbbbdea674a08d28a85afa197a5529b203 (diff) | |
download | YAGE-884c915340b86e162df9bdff9f67ae25407cbaab.tar.gz YAGE-884c915340b86e162df9bdff9f67ae25407cbaab.zip |
Finishing testbench
Diffstat (limited to 'test')
-rw-r--r-- | test/testbench.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/testbench.cpp b/test/testbench.cpp index 9995e5c0..54ce047e 100644 --- a/test/testbench.cpp +++ b/test/testbench.cpp @@ -1,5 +1,6 @@ #include "testbench.hpp" +#include <algorithm> #include <stdexcept> void TestBench::startTest(const std::string &test_name) @@ -34,6 +35,12 @@ void TestBench::endTest(bool pass) void TestBench::printResults() { + std::sort(tests_.begin(), tests_.end(), [] (const Test &a, const Test &b) { + if(a.name<b.name) + return true; + return false; + }); + printf("Results:\n"); printf("+------------+---------+\n"); printf("| Test Name | Result |\n"); |