diff options
author | Bent Bisballe Nyeng <bbn@mjolner.dk> | 2020-10-26 15:34:23 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <bbn@mjolner.dk> | 2020-10-26 15:34:23 +0100 |
commit | d709c0e783c4fd89382725ba3a468bce63362192 (patch) | |
tree | cbffef3b0506dd36e34a1cee79087088996c131a | |
parent | 1bd908531600b1392d98f2e3bfa21e3227df670b (diff) |
Remove unneeded failed count variable.
-rw-r--r-- | uunit.h | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -59,7 +59,6 @@ public: static int runTests(std::ofstream& out) { std::size_t test_num{0}; - std::size_t failed{0}; std::list<test_result> failed_tests; std::list<test_result> successful_tests; @@ -83,7 +82,6 @@ public: result.func = test.name; result.failure_type = "Assertion"; failed_tests.push_back(result); - ++failed; continue; } catch(...) @@ -109,7 +107,6 @@ public: } result.failure_type = "Exception"; failed_tests.push_back(result); - ++failed; continue; } std::cout << "."; @@ -159,7 +156,7 @@ public: out << " </Statistics>" << std::endl; out << "</TestRun>" << std::endl; - return failed == 0 ? 0 : 1; + return failed_tests.size() == 0 ? 0 : 1; } protected: |