X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fscaling_test.cc;h=2d453600e69949338a553a27af17f1af2972b8ff;hb=94618a724124cbf5fe9f0b47a3fdce601fcd5581;hp=c361da80bb2f66053516ad79daf0a1390b8b186d;hpb=ea63ad9560757e56505551db3bf2e1c31be5c76c;p=dcpomatic.git diff --git a/test/scaling_test.cc b/test/scaling_test.cc index c361da80b..2d453600e 100644 --- a/test/scaling_test.cc +++ b/test/scaling_test.cc @@ -25,13 +25,14 @@ */ -#include +#include "lib/content_factory.h" +#include "lib/dcp_content_type.h" +#include "lib/film.h" #include "lib/image_content.h" #include "lib/ratio.h" -#include "lib/film.h" -#include "lib/dcp_content_type.h" #include "lib/video_content.h" #include "test.h" +#include using std::string; @@ -62,7 +63,11 @@ static void scaling_test_for (shared_ptr film, shared_ptr content check /= "scaling_test"; check /= film->dcp_name(); - check_dcp (ref.string(), check.string()); + /* This test is concerned with the image, so we'll ignore any + * differences in sound between the DCP and the reference to avoid test + * failures for unrelated reasons. + */ + check_dcp(ref.string(), check.string(), true); } @@ -93,3 +98,21 @@ BOOST_AUTO_TEST_CASE (scaling_test) /* S: scope image in a scope container */ scaling_test_for (film, imc, 2.38695, "239", "239"); } + + +BOOST_AUTO_TEST_CASE(assertion_failure_when_scaling) +{ + auto content = content_factory("test/data/flat_red.png"); + auto film = new_test_film2("assertion_failure_when_scaling", content); + + content[0]->video->set_custom_size(dcp::Size{3996, 2180}); + film->set_resolution(Resolution::FOUR_K); + + make_and_verify_dcp ( + film, + { + dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE, + dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE + }); +} +