X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Faudio_processor_test.cc;h=8d59a3fe9033f5bc8187b101677ec8b916672575;hb=ce73eaf7875a9a3326afcd839ad85eb95879c160;hp=fcb81e104781e47e1c1db7f65077934a1f5196fe;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/test/audio_processor_test.cc b/test/audio_processor_test.cc index fcb81e104..8d59a3fe9 100644 --- a/test/audio_processor_test.cc +++ b/test/audio_processor_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Carl Hetherington + Copyright (C) 2015-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,11 +18,13 @@ */ + /** @file test/audio_processor_test.cc * @brief Test audio processors. * @ingroup feature */ + #include "lib/audio_processor.h" #include "lib/analyse_audio_job.h" #include "lib/dcp_content_type.h" @@ -32,14 +34,16 @@ #include "test.h" #include -using std::shared_ptr; + +using std::make_shared; + /** Test the mid-side decoder for analysis and DCP-making */ BOOST_AUTO_TEST_CASE (audio_processor_test) { - shared_ptr film = new_test_film ("audio_processor_test"); + auto film = new_test_film ("audio_processor_test"); film->set_name ("audio_processor_test"); - shared_ptr c (new FFmpegContent("test/data/white.wav")); + auto c = make_shared("test/data/white.wav"); film->examine_and_add_content (c); BOOST_REQUIRE (!wait_for_jobs()); @@ -48,12 +52,11 @@ BOOST_AUTO_TEST_CASE (audio_processor_test) film->set_audio_processor (AudioProcessor::from_id ("mid-side-decoder")); /* Analyse the audio and check it doesn't crash */ - shared_ptr job (new AnalyseAudioJob (film, film->playlist(), false)); + auto job = make_shared (film, film->playlist(), false); JobManager::instance()->add (job); BOOST_REQUIRE (!wait_for_jobs()); /* Make a DCP and check it */ - film->make_dcp (); - BOOST_REQUIRE (!wait_for_jobs()); + make_and_verify_dcp (film, {dcp::VerificationNote::Code::MISSING_CPL_METADATA}); check_dcp ("test/data/audio_processor_test", film->dir (film->dcp_name ())); }