Basics of joining.
[dcpomatic.git] / test / util_test.cc
index f75fd0e70efd8b05e4654d4f650e7d10f121a7db..864abab295640bf36d9d6be32cf9f34cfbd99304 100644 (file)
 
 */
 
+#include <boost/test/unit_test.hpp>
+#include "lib/util.h"
+#include "lib/exceptions.h"
+
+using std::string;
+using std::vector;
+using boost::shared_ptr;
+
 BOOST_AUTO_TEST_CASE (util_test)
 {
        string t = "Hello this is a string \"with quotes\" and indeed without them";
@@ -36,8 +44,12 @@ BOOST_AUTO_TEST_CASE (util_test)
 
 BOOST_AUTO_TEST_CASE (md5_digest_test)
 {
-       string const t = md5_digest ("test/data/md5.test");
+       vector<boost::filesystem::path> p;
+       p.push_back ("test/data/md5.test");
+       string const t = md5_digest (p, shared_ptr<Job> ());
        BOOST_CHECK_EQUAL (t, "15058685ba99decdc4398c7634796eb0");
 
-       BOOST_CHECK_THROW (md5_digest ("foobar"), OpenFileError);
+       p.clear ();
+       p.push_back ("foobar");
+       BOOST_CHECK_THROW (md5_digest (p, shared_ptr<Job> ()), OpenFileError);
 }