From 3b6eac4497ecf68053d28dd7f84056ee469129d7 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 16 Mar 2013 17:44:36 +0000 Subject: Add algorithm_kat_detailed which returns a string with info about the failure --- checks/validate.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'checks/validate.cpp') diff --git a/checks/validate.cpp b/checks/validate.cpp index 48bc6bd87..388d4940e 100644 --- a/checks/validate.cpp +++ b/checks/validate.cpp @@ -439,18 +439,18 @@ bool failed_test(const std::string& algo, if(params.size() > 3) vars["iv"] = params[3]; - std::map results = - algorithm_kat(algo, vars, global_state().algorithm_factory()); + Algorithm_Factory& af = global_state().algorithm_factory(); + + const auto results = algorithm_kat_detailed(algo, vars, af); if(results.size()) { - for(std::map::const_iterator i = results.begin(); - i != results.end(); ++i) + for(auto i : results) { - if(i->second == false) + if(i.second != "passed") { std::cout << algo << " test with provider " - << i->first << " failed\n"; + << i.first << " failed - " << i.second << "\n"; return true; } } -- cgit v1.2.3