aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/kat_hash.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-10 00:08:13 +0000
committerlloyd <[email protected]>2014-01-10 00:08:13 +0000
commit57789bdfc55061002b2727d0b32587612829a37c (patch)
tree99f36631b4ec50c5187a1b0a7c256b99182373ad /src/tests/kat_hash.cpp
parent94968c917407a63d888fd3eb4d02491f60de6ebc (diff)
Split up test vectors into per-algo files and app into botan-test for
the tests and botan for everything else.
Diffstat (limited to 'src/tests/kat_hash.cpp')
-rw-r--r--src/tests/kat_hash.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tests/kat_hash.cpp b/src/tests/kat_hash.cpp
index 55510b9f4..eaa3ff3b5 100644
--- a/src/tests/kat_hash.cpp
+++ b/src/tests/kat_hash.cpp
@@ -50,11 +50,16 @@ size_t hash_test(const std::string& algo,
size_t test_hash()
{
- std::ifstream vec(TEST_DATA_DIR "/hash.vec");
+ auto test = [](const std::string& input)
+ {
+ std::ifstream vec(input);
- return run_tests_bb(vec, "Hash", "Out", true,
+ return run_tests_bb(vec, "Hash", "Out", true,
[](std::map<std::string, std::string> m) -> size_t
{
return hash_test(m["Hash"], m["In"], m["Out"]);
});
+ };
+
+ return run_tests_in_dir(TEST_DATA_DIR "hash", test);
}