diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-05-31 02:38:50 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-15 15:26:35 +0200 |
| commit | 7cb07bcec10bfdfed3e82a2dc138114dc6a5ac68 (patch) | |
| tree | fcc7b8bca794aaa3df5b81f4ad22af272628ee9c /test | |
| parent | 11a3284c65b94960ef1e2ad819ccc22e97aa9454 (diff) | |
Allow hash to pass data to some function.
Diffstat (limited to 'test')
| -rw-r--r-- | test/make_digest_test.cc | 8 | ||||
| -rw-r--r-- | test/verify_test.cc | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/test/make_digest_test.cc b/test/make_digest_test.cc index c710f572..38580e78 100644 --- a/test/make_digest_test.cc +++ b/test/make_digest_test.cc @@ -45,12 +45,6 @@ using namespace boost::placeholders; #endif -void progress (float) -{ - -} - - /** Check SHA1 digests */ BOOST_AUTO_TEST_CASE (make_digest_test) { @@ -68,5 +62,5 @@ BOOST_AUTO_TEST_CASE (make_digest_test) data.write ("build/test/random"); /* Hash it */ - BOOST_CHECK_EQUAL (dcp::make_digest("build/test/random", boost::bind(&progress, _1)), "HayqPBWBRKqLNgfuo4XSajc+D5s="); + BOOST_CHECK_EQUAL(dcp::make_digest("build/test/random", [](int64_t, int64_t) {}, [](int64_t, uint8_t const*, int) {}), "HayqPBWBRKqLNgfuo4XSajc+D5s="); } diff --git a/test/verify_test.cc b/test/verify_test.cc index 8395aaa1..f59f0b5c 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -392,7 +392,7 @@ class HashCalculator public: HashCalculator(boost::filesystem::path path) : _path(path) - , _old_hash(dcp::make_digest(path, [](int64_t, int64_t) {})) + , _old_hash(dcp::make_digest(path, [](int64_t, int64_t) {}, [](int64_t, uint8_t const*, int) {})) {} std::string old_hash() const { @@ -400,7 +400,7 @@ public: } std::string new_hash() const { - return dcp::make_digest(_path, [](int64_t, int64_t) {}); + return dcp::make_digest(_path, [](int64_t, int64_t) {}, [](int64_t, uint8_t const*, int) {}); } private: |
