/*
Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
- This program is free software; you can redistribute it and/or modify
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ DCP-o-matic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
*/
using std::vector;
using boost::shared_ptr;
-BOOST_AUTO_TEST_CASE (md5_digest_test)
+BOOST_AUTO_TEST_CASE (digest_head_tail_test)
{
vector<boost::filesystem::path> p;
- p.push_back ("test/data/md5.test");
- BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "57497ef84a0487f2bb0939a1f5703912");
+ p.push_back ("test/data/digest.test");
+ BOOST_CHECK_EQUAL (digest_head_tail (p, 1024), "57497ef84a0487f2bb0939a1f5703912");
- p.push_back ("test/data/md5.test2");
- BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "5a3a89857b931755ae728a518224a05c");
+ p.push_back ("test/data/digest.test2");
+ BOOST_CHECK_EQUAL (digest_head_tail (p, 1024), "5a3a89857b931755ae728a518224a05c");
p.clear ();
- p.push_back ("test/data/md5.test3");
- p.push_back ("test/data/md5.test");
- p.push_back ("test/data/md5.test2");
- p.push_back ("test/data/md5.test4");
- BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "52ccf111e4e72b58bb7b2aaa6bd45ea5");
+ p.push_back ("test/data/digest.test3");
+ p.push_back ("test/data/digest.test");
+ p.push_back ("test/data/digest.test2");
+ p.push_back ("test/data/digest.test4");
+ BOOST_CHECK_EQUAL (digest_head_tail (p, 1024), "52ccf111e4e72b58bb7b2aaa6bd45ea5");
p.clear ();
p.push_back ("foobar");
- BOOST_CHECK_THROW (md5_digest_head_tail (p, 1024), OpenFileError);
+ BOOST_CHECK_THROW (digest_head_tail (p, 1024), OpenFileError);
}
/* Straightforward test of DCPTime::round_up */