From afd1ff651a7ec4a26d4fe3cf799985540750df88 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 29 Jul 2018 21:11:36 -0400 Subject: Add assert to RunTestDataFile --- datatest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'datatest.cpp') diff --git a/datatest.cpp b/datatest.cpp index 9468b480..1cc27e5c 100644 --- a/datatest.cpp +++ b/datatest.cpp @@ -16,6 +16,8 @@ #include "smartptr.h" #include "validate.h" #include "stdcpp.h" +#include "trap.h" + #include #include @@ -934,9 +936,12 @@ bool RunTestDataFile(const char *filename, const NameValuePairs &overrideParamet s_thorough = thorough; unsigned int totalTests = 0, failedTests = 0; TestDataFile((filename ? filename : ""), overrideParameters, totalTests, failedTests); + std::cout << std::dec << "\nTests complete. Total tests = " << totalTests << ". Failed tests = " << failedTests << "." << std::endl; if (failedTests != 0) std::cout << "SOME TESTS FAILED!\n"; + + CRYPTOPP_ASSERT(failedTests == 0); return failedTests == 0; } -- cgit v1.2.1