diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-26 01:24:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-26 01:24:48 +0100 |
| commit | ea63ad9560757e56505551db3bf2e1c31be5c76c (patch) | |
| tree | ec0f539b89d9c8ac627e65886241cc086246ab09 /test/audio_processor_test.cc | |
| parent | cbb8260e395058da76b3de518ebc535a114c54b1 (diff) | |
More verification of DCPs during tests.
Diffstat (limited to 'test/audio_processor_test.cc')
| -rw-r--r-- | test/audio_processor_test.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/audio_processor_test.cc b/test/audio_processor_test.cc index fcb81e104..52dacb646 100644 --- a/test/audio_processor_test.cc +++ b/test/audio_processor_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2015-2021 Carl Hetherington <cth@carlh.net> 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,17 @@ #include "test.h" #include <boost/test/unit_test.hpp> + 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> film = new_test_film ("audio_processor_test"); + auto film = new_test_film ("audio_processor_test"); film->set_name ("audio_processor_test"); - shared_ptr<FFmpegContent> c (new FFmpegContent("test/data/white.wav")); + auto c = make_shared<FFmpegContent>("test/data/white.wav"); film->examine_and_add_content (c); BOOST_REQUIRE (!wait_for_jobs()); @@ -48,12 +53,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<AnalyseAudioJob> job (new AnalyseAudioJob (film, film->playlist(), false)); + auto job = make_shared<AnalyseAudioJob> (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 ())); } |
