aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_hash.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-05 06:23:21 +0000
committerlloyd <[email protected]>2014-01-05 06:23:21 +0000
commitc431fb65b883a0a5fa060ea7caace0aca3628ec6 (patch)
tree09898d2307801bffa7e1aeee9251d57ed4837870 /src/tests/test_hash.cpp
parent052345203b67eb5cacacd5659ec9837eeb59af35 (diff)
Split up public key tests and data, use new test framework
Diffstat (limited to 'src/tests/test_hash.cpp')
-rw-r--r--src/tests/test_hash.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/test_hash.cpp b/src/tests/test_hash.cpp
index bb5788565..55510b9f4 100644
--- a/src/tests/test_hash.cpp
+++ b/src/tests/test_hash.cpp
@@ -10,9 +10,9 @@ using namespace Botan;
namespace {
-bool hash_test(const std::string& algo,
- const std::string& in_hex,
- const std::string& out_hex)
+size_t hash_test(const std::string& algo,
+ const std::string& in_hex,
+ const std::string& out_hex)
{
Algorithm_Factory& af = global_state().algorithm_factory();
@@ -43,17 +43,17 @@ bool hash_test(const std::string& algo,
}
}
- return (fails == 0);
+ return fails;
}
}
size_t test_hash()
{
- std::ifstream vec(CHECKS_DIR "/hash.vec");
+ std::ifstream vec(TEST_DATA_DIR "/hash.vec");
return run_tests_bb(vec, "Hash", "Out", true,
- [](std::map<std::string, std::string> m) -> bool
+ [](std::map<std::string, std::string> m) -> size_t
{
return hash_test(m["Hash"], m["In"], m["Out"]);
});