summaryrefslogtreecommitdiff
path: root/test/asset_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-14 01:00:05 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-14 01:00:05 +0200
commit274dd30f2b11fe8ea563a2ac7436c9d463865b0b (patch)
tree199e7447606339d461f6f87d16095376d8f809b3 /test/asset_test.cc
parent4bd57fbbac67ac04ec47a9765b9f278aa1691851 (diff)
Fix/hide some warnings.
Diffstat (limited to 'test/asset_test.cc')
-rw-r--r--test/asset_test.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/asset_test.cc b/test/asset_test.cc
index a6fa4b33..d6257ebc 100644
--- a/test/asset_test.cc
+++ b/test/asset_test.cc
@@ -36,36 +36,36 @@
#include <boost/bind.hpp>
#include <boost/test/unit_test.hpp>
+
using std::string;
using std::shared_ptr;
+using std::make_shared;
+
class DummyAsset : public dcp::Asset
{
protected:
- std::string pkl_type (dcp::Standard) const {
+ std::string pkl_type (dcp::Standard) const override {
return "none";
}
};
-static void
-note_handler (dcp::NoteType, string)
-{
-
-}
/** Test a few dusty corners of Asset */
BOOST_AUTO_TEST_CASE (asset_test)
{
- shared_ptr<DummyAsset> a (new DummyAsset);
+ auto a = make_shared<DummyAsset>();
a->_hash = "abc";
- shared_ptr<DummyAsset> b (new DummyAsset);
+ auto b = make_shared<DummyAsset>();
b->_hash = "def";
- BOOST_CHECK (!a->equals (b, dcp::EqualityOptions (), boost::bind (&note_handler, _1, _2)));
+ auto ignore = [](dcp::NoteType, string) {};
+
+ BOOST_CHECK (!a->equals(b, dcp::EqualityOptions(), ignore));
b->_hash = "abc";
- BOOST_CHECK (a->equals (b, dcp::EqualityOptions (), boost::bind (&note_handler, _1, _2)));
+ BOOST_CHECK (a->equals(b, dcp::EqualityOptions(), ignore));
b->_file = "foo/bar/baz";
- BOOST_CHECK (a->equals (b, dcp::EqualityOptions (), boost::bind (&note_handler, _1, _2)));
+ BOOST_CHECK (a->equals(b, dcp::EqualityOptions(), ignore));
}