diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-14 22:30:29 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-14 22:30:29 +0000 |
| commit | c375db5cd3e9e1bd06b8f613b0163b873b824aec (patch) | |
| tree | 63359f7d5459c6f0b2e75d76b66ab2222a3df763 | |
| parent | 2ed09754ce80e30bb5e44766752e354543d7418a (diff) | |
Add test for scope, too.
| -rw-r--r-- | test/cpl_sar.cc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/test/cpl_sar.cc b/test/cpl_sar.cc index 064d9510..2beb1b65 100644 --- a/test/cpl_sar.cc +++ b/test/cpl_sar.cc @@ -30,11 +30,24 @@ using boost::shared_ptr; BOOST_AUTO_TEST_CASE (cpl_sar) { shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ("build/test/foo", "video.mxf")); - mp->set_size (libdcp::Size (1998, 1080)); - xmlpp::Document doc; - xmlpp::Element* el = doc.create_root_node ("Test"); - mp->write_to_cpl (el, true); - cxml::Node node (el); - BOOST_CHECK_EQUAL (node.node_child("MainPicture")->string_child ("ScreenAspectRatio"), "1.85"); + { + mp->set_size (libdcp::Size (1998, 1080)); + xmlpp::Document doc; + xmlpp::Element* el = doc.create_root_node ("Test"); + mp->write_to_cpl (el, true); + + cxml::Node node (el); + BOOST_CHECK_EQUAL (node.node_child("MainPicture")->string_child ("ScreenAspectRatio"), "1.85"); + } + + { + mp->set_size (libdcp::Size (2048, 858)); + xmlpp::Document doc; + xmlpp::Element* el = doc.create_root_node ("Test"); + mp->write_to_cpl (el, true); + + cxml::Node node (el); + BOOST_CHECK_EQUAL (node.node_child("MainPicture")->string_child ("ScreenAspectRatio"), "2.39"); + } } |
