2 Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
4 This file is part of libdcp.
6 libdcp is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 libdcp is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with libdcp. If not, see <http://www.gnu.org/licenses/>.
20 #include <boost/test/unit_test.hpp>
21 #include <boost/optional/optional_io.hpp>
26 using boost::shared_ptr;
28 /** Read a SMPTE DCP that is in git and make sure that basic stuff is read in correctly */
29 BOOST_AUTO_TEST_CASE (read_dcp_test1)
31 dcp::DCP d ("test/ref/DCP/dcp_test1");
34 list<shared_ptr<dcp::CPL> > cpls = d.cpls ();
35 BOOST_CHECK_EQUAL (cpls.size(), 1);
37 BOOST_CHECK_EQUAL (cpls.front()->annotation_text(), "A Test DCP");
38 BOOST_CHECK_EQUAL (cpls.front()->content_kind(), dcp::FEATURE);
39 BOOST_REQUIRE (d.standard());
40 BOOST_CHECK_EQUAL (d.standard(), dcp::SMPTE);
43 /** Read an Interop DCP that is in git and make sure that basic stuff is read in correctly */
44 BOOST_AUTO_TEST_CASE (read_dcp_test2)
46 dcp::DCP d ("test/ref/DCP/dcp_test3");
49 list<shared_ptr<dcp::CPL> > cpls = d.cpls ();
50 BOOST_CHECK_EQUAL (cpls.size(), 1);
52 BOOST_CHECK_EQUAL (cpls.front()->annotation_text(), "Test_FTR-1_F-119_10_2K_20160524_IOP_OV");
53 BOOST_CHECK_EQUAL (cpls.front()->content_kind(), dcp::FEATURE);
54 BOOST_REQUIRE (d.standard());
55 BOOST_CHECK_EQUAL (d.standard(), dcp::INTEROP);