X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fkdm_naming_test.cc;h=f73e4295e445458968e7e83bf1379bc0401015ae;hb=17ef19940f152ceeb2e1ad696dd5e7ac5917d8cd;hp=30356afbfe36015dcd6e03c06af3abd123145869;hpb=20c7c1a0bc0c9c07d70b5d3dcc536a5cd94e8a2c;p=dcpomatic.git diff --git a/test/kdm_naming_test.cc b/test/kdm_naming_test.cc index 30356afbf..f73e4295e 100644 --- a/test/kdm_naming_test.cc +++ b/test/kdm_naming_test.cc @@ -59,16 +59,14 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test) auto crypt_cert = c->decryption_chain()->leaf(); - /* Cinema A: UTC +4:30 */ - auto cinema_a = make_shared("Cinema A", list(), "", 4, 30); + auto cinema_a = make_shared("Cinema A", vector(), "", dcp::UTCOffset{4, 30}); cinema_a_screen_1 = std::make_shared("Screen 1", "", crypt_cert, boost::none, vector()); cinema_a->add_screen (cinema_a_screen_1); cinema_a_screen_2 = std::make_shared("Screen 2", "", crypt_cert, boost::none, vector()); cinema_a->add_screen (cinema_a_screen_2); c->add_cinema (cinema_a); - /* Cinema B: UTC -1:00 */ - auto cinema_b = make_shared("Cinema B", list(), "", -1, 0); + auto cinema_b = make_shared("Cinema B", vector(), "", dcp::UTCOffset{-1, 0}); cinema_b_screen_x = std::make_shared("Screen X", "", crypt_cert, boost::none, vector()); cinema_b->add_screen (cinema_b_screen_x); cinema_b_screen_y = std::make_shared("Screen Y", "", crypt_cert, boost::none, vector()); @@ -90,14 +88,11 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test) auto sign_cert = c->signer_chain()->leaf(); - dcp::LocalTime from (sign_cert.not_before()); + dcp::LocalTime from = sign_cert.not_before(); from.add_months (2); - dcp::LocalTime until (sign_cert.not_after()); + dcp::LocalTime until = sign_cert.not_after(); until.add_months (-2); - 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 period_checks; auto cpl = cpls.front().cpl_file; @@ -107,8 +102,8 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test) auto kdm = kdm_for_screen ( make_kdm, cinema_a_screen_1, - boost::posix_time::time_from_string(from_string), - boost::posix_time::time_from_string(until_string), + from, + until, dcp::Formulation::MODIFIED_TRANSITIONAL_1, false, optional(), @@ -157,10 +152,7 @@ BOOST_AUTO_TEST_CASE (directory_kdm_naming_test, * boost::unit_test::depends_on( dcp::LocalTime until (sign_cert.not_after()); until.add_months (-2); - string const from_string = from.date() + " " + from.time_of_day(true, false); - string const until_string = until.date() + " " + until.time_of_day(true, false); - - list> screens = { + vector> screens = { cinema_a_screen_2, cinema_b_screen_x, cinema_a_screen_1, (cinema_b_screen_z) }; @@ -178,8 +170,8 @@ BOOST_AUTO_TEST_CASE (directory_kdm_naming_test, * boost::unit_test::depends_on( auto kdm = kdm_for_screen ( make_kdm, i, - boost::posix_time::time_from_string(from_string), - boost::posix_time::time_from_string(until_string), + from, + until, dcp::Formulation::MODIFIED_TRANSITIONAL_1, false, optional(),