Add assert to RunTestDataFile

pull/696/head
Jeffrey Walton 2018-07-29 21:11:36 -04:00
parent 25a32d3544
commit afd1ff651a
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,8 @@
#include "smartptr.h"
#include "validate.h"
#include "stdcpp.h"
#include "trap.h"
#include <iostream>
#include <sstream>
@ -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;
}