aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_stream.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_stream.cpp
parent052345203b67eb5cacacd5659ec9837eeb59af35 (diff)
Split up public key tests and data, use new test framework
Diffstat (limited to 'src/tests/test_stream.cpp')
-rw-r--r--src/tests/test_stream.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/test_stream.cpp b/src/tests/test_stream.cpp
index 9846fb521..6492ffee5 100644
--- a/src/tests/test_stream.cpp
+++ b/src/tests/test_stream.cpp
@@ -10,11 +10,11 @@ using namespace Botan;
namespace {
-bool stream_test(const std::string& algo,
- const std::string& key_hex,
- const std::string& in_hex,
- const std::string& out_hex,
- const std::string& nonce_hex)
+size_t stream_test(const std::string& algo,
+ const std::string& key_hex,
+ const std::string& in_hex,
+ const std::string& out_hex,
+ const std::string& nonce_hex)
{
const secure_vector<byte> key = hex_decode_locked(key_hex);
const secure_vector<byte> pt = hex_decode_locked(in_hex);
@@ -54,17 +54,17 @@ bool stream_test(const std::string& algo,
}
}
- return (fails == 0);
+ return fails;
}
}
size_t test_stream()
{
- std::ifstream vec(CHECKS_DIR "/stream.vec");
+ std::ifstream vec(TEST_DATA_DIR "/stream.vec");
return run_tests_bb(vec, "StreamCipher", "Out", true,
- [](std::map<std::string, std::string> m) -> bool
+ [](std::map<std::string, std::string> m) -> size_t
{
return stream_test(m["StreamCipher"], m["Key"], m["In"], m["Out"], m["Nonce"]);
});