diff options
| author | cah <cth@carlh.net> | 2021-09-25 20:38:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-09-25 22:21:31 +0200 |
| commit | f9ead014bdfaa7abd7dcea55650ae261e8323ec7 (patch) | |
| tree | e8d6b490dc79eebe55e5a6a344141978b0459793 /test | |
| parent | 21333e55ec55cce4d8fcf5bb7fa1e21292fc9c17 (diff) | |
Read ISDCF Metadata from 2.14.x metadata (#2083).
Diffstat (limited to 'test')
| m--------- | test/data | 0 | ||||
| -rw-r--r-- | test/film_metadata_test.cc | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/data b/test/data -Subproject 9a5f520e6106d259c9fb4bd364fb0a881a599f7 +Subproject d8d9a1eedc24b5f67f377b6e87e649cdee6fc3b diff --git a/test/film_metadata_test.cc b/test/film_metadata_test.cc index 029b990e9..80ecf3881 100644 --- a/test/film_metadata_test.cc +++ b/test/film_metadata_test.cc @@ -41,6 +41,7 @@ using std::string; using std::list; using std::make_shared; +using std::vector; BOOST_AUTO_TEST_CASE (film_metadata_test) @@ -125,3 +126,28 @@ BOOST_AUTO_TEST_CASE (metadata_loads_from_2_14_x_2) ); } + +BOOST_AUTO_TEST_CASE (metadata_loads_from_2_14_x_3) +{ + namespace fs = boost::filesystem; + auto film = make_shared<Film>(fs::path("build/test/metadata_loads_from_2_14_x_3")); + auto notes = film->read_metadata(fs::path("test/data/2.14.x.metadata.3.xml")); + + BOOST_REQUIRE (film->release_territory()); + BOOST_REQUIRE (film->release_territory()->subtag() == dcp::LanguageTag::RegionSubtag("de").subtag()); + + BOOST_REQUIRE (film->audio_language()); + BOOST_REQUIRE (*film->audio_language() == dcp::LanguageTag("sv-SE")); + + BOOST_REQUIRE (film->content_versions() == vector<string>{"3"}); + BOOST_REQUIRE (film->ratings() == vector<dcp::Rating>{ dcp::Rating("", "214rating") }); + BOOST_REQUIRE_EQUAL (film->studio().get_value_or(""), "214studio"); + BOOST_REQUIRE_EQUAL (film->facility().get_value_or(""), "214facility"); + BOOST_REQUIRE_EQUAL (film->temp_version(), true); + BOOST_REQUIRE_EQUAL (film->pre_release(), true); + BOOST_REQUIRE_EQUAL (film->red_band(), true); + BOOST_REQUIRE_EQUAL (film->two_d_version_of_three_d(), true); + BOOST_REQUIRE_EQUAL (film->chain().get_value_or(""), "214chain"); + BOOST_REQUIRE (film->luminance() == dcp::Luminance(14, dcp::Luminance::Unit::FOOT_LAMBERT)); +} + |
