X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fscaling_test.cc;h=9a3424506c0c5dae589cc406e9c1733884c0ad8d;hb=963a684d107f7135e6680c2ed7f88e8aa5810ea1;hp=dd3b6118ecf6eea8a76acd870d84c9788185a0bd;hpb=15a83d720780d58f905d40f8493cdcb86596eaee;p=dcpomatic.git diff --git a/test/scaling_test.cc b/test/scaling_test.cc index dd3b6118e..9a3424506 100644 --- a/test/scaling_test.cc +++ b/test/scaling_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2014 Carl Hetherington + Copyright (C) 2013-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,30 +18,38 @@ */ + /** @file test/scaling_test.cc * @brief Test scaling and black-padding of images from a still-image source. - * @ingroup specific + * @ingroup feature */ -#include + +#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; -using boost::shared_ptr; +using std::shared_ptr; +using std::make_shared; + static void scaling_test_for (shared_ptr film, shared_ptr content, float ratio, std::string image, string container) { content->video->set_custom_ratio (ratio); film->set_container (Ratio::from_id (container)); film->set_interop (false); - film->make_dcp (); - - BOOST_REQUIRE (!wait_for_jobs()); + make_and_verify_dcp ( + film, + { + dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE, + dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE + }); boost::filesystem::path ref; ref = "test"; @@ -57,12 +65,13 @@ static void scaling_test_for (shared_ptr film, shared_ptr content check_dcp (ref.string(), check.string()); } + BOOST_AUTO_TEST_CASE (scaling_test) { - shared_ptr film = new_test_film ("scaling_test"); - film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR")); + auto film = new_test_film ("scaling_test"); + film->set_dcp_content_type (DCPContentType::from_isdcf_name("FTR")); film->set_name ("scaling_test"); - shared_ptr imc (new ImageContent("test/data/simple_testcard_640x480.png")); + auto imc = make_shared("test/data/simple_testcard_640x480.png"); film->examine_and_add_content (imc);