summaryrefslogtreecommitdiff
path: root/test/tests.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-31 18:16:58 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-31 18:16:58 +0000
commit4f902db0ad994910a34ca845225635ceefcac96e (patch)
treeadf80a8543c20082057f7ed1e75b46524257b2e1 /test/tests.cc
parente651d843c513e8dbf0967735ea702a3795ac321d (diff)
Initial hacks.
Diffstat (limited to 'test/tests.cc')
-rw-r--r--test/tests.cc57
1 files changed, 52 insertions, 5 deletions
diff --git a/test/tests.cc b/test/tests.cc
index ef25b7c8..a842fa4d 100644
--- a/test/tests.cc
+++ b/test/tests.cc
@@ -76,7 +76,8 @@ BOOST_AUTO_TEST_CASE (dcp_test)
24,
24,
32,
- 32
+ 32,
+ false
));
shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset (
@@ -86,7 +87,8 @@ BOOST_AUTO_TEST_CASE (dcp_test)
&(d.Progress),
24,
24,
- 2
+ 2,
+ false
));
cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
@@ -97,12 +99,12 @@ BOOST_AUTO_TEST_CASE (dcp_test)
BOOST_AUTO_TEST_CASE (error_test)
{
- libdcp::DCP d ("build/test/bar");
+ libdcp::DCP d ("build/test/fred");
vector<string> p;
p.push_back ("frobozz");
- BOOST_CHECK_THROW (new libdcp::MonoPictureAsset (p, "build/test/bar", "video.mxf", &d.Progress, 24, 24, 32, 32), libdcp::FileError);
- BOOST_CHECK_THROW (new libdcp::SoundAsset (p, "build/test/bar", "audio.mxf", &d.Progress, 24, 24), libdcp::FileError);
+ BOOST_CHECK_THROW (new libdcp::MonoPictureAsset (p, "build/test/fred", "video.mxf", &d.Progress, 24, 24, 32, 32, false), libdcp::FileError);
+ BOOST_CHECK_THROW (new libdcp::SoundAsset (p, "build/test/fred", "audio.mxf", &d.Progress, 24, 24, false), libdcp::FileError);
}
BOOST_AUTO_TEST_CASE (read_dcp)
@@ -579,3 +581,48 @@ BOOST_AUTO_TEST_CASE (color)
BOOST_CHECK_EQUAL (c.to_argb_string(), "FF0000FF");
}
+
+BOOST_AUTO_TEST_CASE (encryption)
+{
+ Kumu::libdcp_test = true;
+
+ libdcp::Metadata* t = libdcp::Metadata::instance ();
+ t->issuer = "OpenDCP 0.0.25";
+ t->creator = "OpenDCP 0.0.25";
+ t->company_name = "OpenDCP";
+ t->product_name = "OpenDCP";
+ t->product_version = "0.0.25";
+ t->issue_date = "2012-07-17T04:45:18+00:00";
+ boost::filesystem::remove_all ("build/test/bar");
+ boost::filesystem::create_directories ("build/test/bar");
+ libdcp::DCP d ("build/test/bar");
+ shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("build/test/bar", "A Test DCP", libdcp::FEATURE, 24, 24));
+
+ shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset (
+ j2c,
+ "build/test/bar",
+ "video.mxf",
+ &d.Progress,
+ 24,
+ 24,
+ 32,
+ 32,
+ false
+ ));
+
+ shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset (
+ wav,
+ "build/test/bar",
+ "audio.mxf",
+ &(d.Progress),
+ 24,
+ 24,
+ 2,
+ false
+ ));
+
+ cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
+ d.add_cpl (cpl);
+
+ d.write_xml ();
+}