summaryrefslogtreecommitdiff
path: root/test/dcp_digest_file_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-11-03 18:19:58 +0100
committerCarl Hetherington <cth@carlh.net>2022-04-20 21:23:54 +0200
commit2034cf8a82be21d4d07de81ae40c8255da1ed21e (patch)
tree631f10769840228b1cf8ec591b02274369f4d218 /test/dcp_digest_file_test.cc
parent86eb90b563efb7ef093d5b17a5d6db0fc330e301 (diff)
Support DCP digest files (#2109).
Diffstat (limited to 'test/dcp_digest_file_test.cc')
-rw-r--r--test/dcp_digest_file_test.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/dcp_digest_file_test.cc b/test/dcp_digest_file_test.cc
new file mode 100644
index 000000000..85928b6bb
--- /dev/null
+++ b/test/dcp_digest_file_test.cc
@@ -0,0 +1,40 @@
+/*
+ Copyright (C) 2021 Carl Hetherington <cth@carlh.net>
+
+ 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.
+
+ 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "lib/content_factory.h"
+#include "lib/dcp_digest_file.h"
+#include "lib/film.h"
+#include "test.h"
+#include <dcp/dcp.h>
+#include <boost/test/unit_test.hpp>
+
+
+BOOST_AUTO_TEST_CASE (dcp_digest_file_test)
+{
+ dcp::DCP dcp("test/data/dcp_digest_test_dcp");
+ dcp.read ();
+ BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U);
+
+ write_dcp_digest_file ("build/test/digest.xml", dcp.cpls()[0], "e684e49e89182e907dabe5d9b3bd81ba");
+
+ check_xml ("test/data/digest.xml", "build/test/digest.xml", {});
+}
+