Add basic Collator::find() method.
[dcpomatic.git] / test / scaling_test.cc
index c361da80bb2f66053516ad79daf0a1390b8b186d..11b8ae1b744587c50cbe4842e73600c45308d51f 100644 (file)
  */
 
 
-#include <boost/test/unit_test.hpp>
+#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 <boost/test/unit_test.hpp>
 
 
 using std::string;
@@ -93,3 +94,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
+               });
+}
+