projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update wscript (missed in last commit).
[dcpomatic.git]
/
test
/
kdm_naming_test.cc
diff --git
a/test/kdm_naming_test.cc
b/test/kdm_naming_test.cc
index f53f4aba2102d1987a324400884c628883ac6aef..30356afbfe36015dcd6e03c06af3abd123145869 100644
(file)
--- a/
test/kdm_naming_test.cc
+++ b/
test/kdm_naming_test.cc
@@
-81,7
+81,7
@@
BOOST_AUTO_TEST_CASE (single_kdm_naming_test)
boost::filesystem::remove_all ("build/test/single_kdm_naming_test");
auto film = new_test_film2 ("single_kdm_naming_test");
film->set_name ("my_great_film");
boost::filesystem::remove_all ("build/test/single_kdm_naming_test");
auto film = new_test_film2 ("single_kdm_naming_test");
film->set_name ("my_great_film");
- film->examine_and_add_content (content_factory("test/data/flat_black.png")
.front()
);
+ film->examine_and_add_content (content_factory("test/data/flat_black.png")
[0]
);
BOOST_REQUIRE (!wait_for_jobs());
film->set_encrypted (true);
make_and_verify_dcp (film);
BOOST_REQUIRE (!wait_for_jobs());
film->set_encrypted (true);
make_and_verify_dcp (film);
@@
-98,16
+98,21
@@
BOOST_AUTO_TEST_CASE (single_kdm_naming_test)
auto const from_string = from.date() + " " + from.time_of_day(true, false);
auto const until_string = until.date() + " " + until.time_of_day(true, false);
auto const from_string = from.date() + " " + from.time_of_day(true, false);
auto const until_string = until.date() + " " + until.time_of_day(true, false);
+ std::vector<KDMCertificatePeriod> period_checks;
+
auto cpl = cpls.front().cpl_file;
auto cpl = cpls.front().cpl_file;
+ std::function<dcp::DecryptedKDM (dcp::LocalTime, dcp::LocalTime)> make_kdm = [film, cpl](dcp::LocalTime begin, dcp::LocalTime end) {
+ return film->make_kdm(cpl, begin, end);
+ };
auto kdm = kdm_for_screen (
auto kdm = kdm_for_screen (
- film,
- cpls.front().cpl_file,
+ make_kdm,
cinema_a_screen_1,
boost::posix_time::time_from_string(from_string),
boost::posix_time::time_from_string(until_string),
dcp::Formulation::MODIFIED_TRANSITIONAL_1,
false,
cinema_a_screen_1,
boost::posix_time::time_from_string(from_string),
boost::posix_time::time_from_string(until_string),
dcp::Formulation::MODIFIED_TRANSITIONAL_1,
false,
- optional<int>()
+ optional<int>(),
+ period_checks
);
write_files (
);
write_files (
@@
-136,7
+141,7
@@
BOOST_AUTO_TEST_CASE (directory_kdm_naming_test, * boost::unit_test::depends_on(
boost::filesystem::remove_all ("build/test/directory_kdm_naming_test");
auto film = new_test_film2 (
"directory_kdm_naming_test",
boost::filesystem::remove_all ("build/test/directory_kdm_naming_test");
auto film = new_test_film2 (
"directory_kdm_naming_test",
- { content_factory("test/data/flat_black.png")
.front()
}
+ { content_factory("test/data/flat_black.png")
[0]
}
);
film->set_name ("my_great_film");
);
film->set_name ("my_great_film");
@@
-162,17
+167,23
@@
BOOST_AUTO_TEST_CASE (directory_kdm_naming_test, * boost::unit_test::depends_on(
auto const cpl = cpls.front().cpl_file;
auto const cpl_id = cpls.front().cpl_id;
auto const cpl = cpls.front().cpl_file;
auto const cpl_id = cpls.front().cpl_id;
+ std::vector<KDMCertificatePeriod> period_checks;
list<KDMWithMetadataPtr> kdms;
list<KDMWithMetadataPtr> kdms;
+
+ std::function<dcp::DecryptedKDM (dcp::LocalTime, dcp::LocalTime)> make_kdm = [film, cpls](dcp::LocalTime begin, dcp::LocalTime end) {
+ return film->make_kdm(cpls.front().cpl_file, begin, end);
+ };
+
for (auto i: screens) {
auto kdm = kdm_for_screen (
for (auto i: screens) {
auto kdm = kdm_for_screen (
- film,
- cpls.front().cpl_file,
+ make_kdm,
i,
boost::posix_time::time_from_string(from_string),
boost::posix_time::time_from_string(until_string),
dcp::Formulation::MODIFIED_TRANSITIONAL_1,
false,
i,
boost::posix_time::time_from_string(from_string),
boost::posix_time::time_from_string(until_string),
dcp::Formulation::MODIFIED_TRANSITIONAL_1,
false,
- optional<int>()
+ optional<int>(),
+ period_checks
);
kdms.push_back (kdm);
);
kdms.push_back (kdm);