Cleanup: test tidying.
authorCarl Hetherington <cth@carlh.net>
Thu, 29 Dec 2022 00:47:32 +0000 (01:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 29 Dec 2022 00:47:32 +0000 (01:47 +0100)
58 files changed:
test/4k_test.cc
test/atmos_test.cc
test/audio_analysis_test.cc
test/audio_delay_test.cc
test/audio_filter_test.cc
test/audio_processor_delay_test.cc
test/audio_processor_test.cc
test/audio_ring_buffers_test.cc
test/burnt_subtitle_test.cc
test/butler_test.cc
test/closed_caption_test.cc
test/colour_conversion_test.cc
test/content_test.cc
test/cpl_hash_test.cc
test/dcp_decoder_test.cc
test/dcp_subtitle_test.cc
test/digest_test.cc
test/ffmpeg_audio_test.cc
test/ffmpeg_dcp_test.cc
test/ffmpeg_encoder_test.cc
test/ffmpeg_examiner_test.cc
test/ffmpeg_pts_offset_test.cc
test/file_naming_test.cc
test/frame_rate_test.cc
test/image_content_fade_test.cc
test/image_proxy_test.cc
test/import_dcp_test.cc
test/interrupt_encoder_test.cc
test/j2k_bandwidth_test.cc
test/markers_test.cc
test/no_use_video_test.cc
test/optimise_stills_test.cc
test/overlap_video_test.cc
test/pulldown_detect_test.cc
test/recover_test.cc
test/reels_test.cc
test/remake_id_test.cc
test/remake_with_subtitle_test.cc
test/repeat_frame_test.cc
test/required_disk_space_test.cc
test/resampler_test.cc
test/shuffler_test.cc
test/silence_padding_test.cc
test/skip_frame_test.cc
test/srt_subtitle_test.cc
test/ssa_subtitle_test.cc
test/stream_test.cc
test/subtitle_charset_test.cc
test/subtitle_font_id_test.cc
test/subtitle_language_test.cc
test/subtitle_metadata_test.cc
test/subtitle_reel_number_test.cc
test/subtitle_reel_test.cc
test/subtitle_trim_test.cc
test/threed_test.cc
test/util_test.cc
test/vf_kdm_test.cc
test/video_mxf_content_test.cc

index 4db576cfc0d1db1f4c2aa464b2144b492242ab5c..86cb0275b54e7456b22f3459ad0a930e7f15018a 100644 (file)
  */
 
 
-#include <boost/test/unit_test.hpp>
-#include "lib/film.h"
-#include "lib/ffmpeg_content.h"
 #include "lib/dcp_content_type.h"
-#include "lib/video_content.h"
-#include "lib/ratio.h"
 #include "lib/dcpomatic_log.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/film.h"
+#include "lib/ratio.h"
+#include "lib/video_content.h"
 #include "test.h"
+#include <boost/test/unit_test.hpp>
 
 
-using std::shared_ptr;
 using std::make_shared;
 
 
index ec7e9e85d89c6cbe06e6fb512118c8a1d66649b9..5c624a871c230e9b5665e6bb466106efc5c57559 100644 (file)
 #include <boost/test/unit_test.hpp>
 
 
+using std::make_shared;
 using std::string;
 using std::vector;
-using std::make_shared;
 using boost::optional;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (atmos_passthrough_test)
index b3c519f2934963a8001da3c258cbbcf1d58633a5..df809bb1510097b041ff4db9600cc5adf0912413 100644 (file)
@@ -43,7 +43,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 using std::vector;
 using namespace dcpomatic;
 
index 688186e004973b53a10d002b87a951b5a38156b7..bafdea4e1ea89835cd914e5462fb5aa02988e653 100644 (file)
@@ -47,7 +47,6 @@
 
 using std::cout;
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 using boost::lexical_cast;
 
index 8f0b9e794a487eee2233c0b890566e2dbda89861..b5ac25af71cd878fd8cedebe2bb84b5339633e32 100644 (file)
@@ -31,7 +31,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 static void
index 47a1cc8adfb344112ca01c8c22456ebbc2034599..90c8c18979ee8d62604f21cc271d81b3241df76d 100644 (file)
@@ -35,7 +35,6 @@
 using std::cerr;
 using std::cout;
 using std::make_shared;
-using std::shared_ptr;
 
 
 #define CHECK_SAMPLE(c,f,r) \
index 52dacb646bb65b4cfb4f777224c6ba5d8e9914fe..8d59a3fe9033f5bc8187b101677ec8b916672575 100644 (file)
@@ -35,7 +35,6 @@
 #include <boost/test/unit_test.hpp>
 
 
-using std::shared_ptr;
 using std::make_shared;
 
 
index 6efd8fbf8e58c9ba34def776881b0a75d4fedc22..ef64f5fbaca84cae4964115d2f7f3041c9ee8f25 100644 (file)
 
 */
 
+
 #include "lib/audio_ring_buffers.h"
 #include <boost/test/unit_test.hpp>
-#include <iostream>
 
-using std::cout;
+
 using std::make_shared;
-using std::shared_ptr;
 using namespace dcpomatic;
 
+
 #define CANARY 9999
 
+
 /* XXX: these tests don't check the timestamping in AudioRingBuffers */
 
 /** Basic tests fetching the same number of channels as went in */
index 38ce61326be1cb5ed0b534a312a2a912e105ff32..8136253e2cf6cffae5005331b935f207e194e8c4 100644 (file)
 
 */
 
+
 /** @file  test/burnt_subtitle_test.cc
  *  @brief Test the burning of subtitles into the DCP.
  *  @ingroup feature
  */
 
-#include "lib/plain_text_content.h"
+
+#include "lib/config.h"
+#include "lib/content_factory.h"
+#include "lib/dcp_content.h"
+#include "lib/dcp_content_type.h"
 #include "lib/dcp_text_content.h"
 #include "lib/film.h"
+#include "lib/log_entry.h"
+#include "lib/plain_text_content.h"
 #include "lib/ratio.h"
-#include "lib/dcp_content_type.h"
 #include "lib/text_content.h"
-#include "lib/dcp_content.h"
-#include "lib/content_factory.h"
-#include "lib/config.h"
-#include "lib/log_entry.h"
 #include "test.h"
 #include <dcp/dcp.h>
 #include <dcp/cpl.h>
 #include <dcp/reel_picture_asset.h>
 #include <dcp/reel_mono_picture_asset.h>
 #include <boost/test/unit_test.hpp>
-#include <iostream>
 
-using std::cout;
-using std::map;
-using std::shared_ptr;
+
 using std::dynamic_pointer_cast;
 using std::make_shared;
+using std::map;
 using namespace dcpomatic;
 
+
 /** Build a small DCP with no picture and a single subtitle overlaid onto it from a SubRip file */
 BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip)
 {
index 97e4ccc0effbdec2718baa3fd399bc8303398940..1c59de798d47eeecd16bf63b2cd2351671287840 100644 (file)
@@ -32,7 +32,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
index d1cb9c3e31b30069386ddb2ba665617764023d1c..80effc9a0c0c99e0652eca18c2fea378aa246ba0 100644 (file)
 
 */
 
+
 #include "lib/film.h"
-#include "lib/text_content.h"
 #include "lib/string_text_file_content.h"
+#include "lib/text_content.h"
 #include "test.h"
-#include <dcp/dcp.h>
 #include <dcp/cpl.h>
+#include <dcp/dcp.h>
 #include <dcp/reel.h>
 #include <dcp/reel_closed_caption_asset.h>
 #include <boost/test/unit_test.hpp>
 
+
 using std::list;
 using std::make_shared;
-using std::shared_ptr;
+
 
 /** Basic test that Interop closed captions are written */
 BOOST_AUTO_TEST_CASE (closed_caption_test1)
index c48a0b63a6c19b6d171e16a0f70717638b46a6b7..4ac89e290d520a7255eba5ea19010d9cbf9773d5 100644 (file)
@@ -35,7 +35,6 @@
 
 using std::cout;
 using std::make_shared;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (colour_conversion_test1)
index 12e653875a43d7e3587d81d5a46d7a4076e641b7..85862af82e32e0f44328d8a556d0d49d2d1d4c23 100644 (file)
@@ -35,7 +35,6 @@
 #include <boost/test/unit_test.hpp>
 
 
-using std::shared_ptr;
 using namespace dcpomatic;
 
 
index de9b9b900c8b8a6d7ba3d9ae515450958ba5b63e..39c36561b5d97cb59835a2ad69a3abfe992ba9ab 100644 (file)
@@ -35,7 +35,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 
 
@@ -44,7 +43,7 @@ BOOST_AUTO_TEST_CASE (hash_added_to_imported_dcp_test)
        using namespace boost::filesystem;
 
        string const ov_name = "hash_added_to_imported_dcp_test_ov";
-       shared_ptr<Film> ov = new_test_film2 (
+       auto ov = new_test_film2(
                ov_name,
                content_factory("test/data/flat_red.png")
                );
index da4f6dcbb8bd0f4bb55dc7ee6ef8d9afa8b22ea2..c9474b998c0e0da98f1347d52cb5d7d208a4f2b2 100644 (file)
 
 
 using std::list;
+using std::make_shared;
 using std::string;
 using std::vector;
-using std::make_shared;
-using std::shared_ptr;
 
 
 /* Check that DCPDecoder reuses old data when it should */
index a7ec34514876ba3075afdbda9cca6a45a6d0486f..6798cf67868be4c6dd26c5da68dc7823835633e5 100644 (file)
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test)
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
 
-       shared_ptr<DCPDecoder> decoder (new DCPDecoder (film, content, false, false, shared_ptr<DCPDecoder>()));
+       auto decoder = make_shared<DCPDecoder>(film, content, false, false, shared_ptr<DCPDecoder>());
        decoder->only_text()->PlainStart.connect (bind (store, _1));
 
        stored = optional<ContentStringText> ();
index 59a8cb7a772f8b7d92dbf0c98aa964df2e812f1e..2d49768f7c83d4435e1a9381a642d7510c949561 100644 (file)
  */
 
 
-#include "lib/film.h"
-#include "lib/image_content.h"
-#include "lib/dcp_content_type.h"
 #include "lib/compose.hpp"
 #include "lib/config.h"
+#include "lib/dcp_content_type.h"
+#include "lib/film.h"
+#include "lib/image_content.h"
 #include "test.h"
 #include <dcp/cpl.h>
 #include <dcp/reel.h>
@@ -38,9 +38,8 @@
 
 
 using std::list;
-using std::string;
-using std::shared_ptr;
 using std::make_shared;
+using std::string;
 
 
 static string
index ea7293f13d00936299c3a698e46fb11a26c7bdb0..054567d3b2e136444416ba8a644481e3b01d20ce 100644 (file)
@@ -46,7 +46,6 @@
 
 using std::make_shared;
 using std::string;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
index 0d56f4290fd1788db1e655773717e5274df96e71..c1c32294814a4f01576f5fc92fdcfaf80044756e 100644 (file)
  */
 
 
-#include <boost/test/unit_test.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string.hpp>
-#include "lib/film.h"
+#include "lib/dcp_content_type.h"
 #include "lib/ffmpeg_content.h"
+#include "lib/film.h"
 #include "lib/ratio.h"
-#include "lib/dcp_content_type.h"
 #include "lib/video_content.h"
 #include "test.h"
+#include <boost/algorithm/string.hpp>
+#include <boost/filesystem.hpp>
+#include <boost/test/unit_test.hpp>
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (ffmpeg_dcp_test)
index 0881d2e2e1007b40dad31c069c64724231586d2b..90bac56ef21e8181d23125a313c8616cac9f328f 100644 (file)
@@ -40,9 +40,8 @@
 #include <boost/test/unit_test.hpp>
 
 
-using std::string;
-using std::shared_ptr;
 using std::make_shared;
+using std::string;
 using namespace dcpomatic;
 
 
@@ -387,9 +386,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test8)
 /** 7.1/HI/VI (i.e. 12-channel) project */
 BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test9)
 {
-       shared_ptr<Film> film = new_test_film ("ffmpeg_encoder_prores_test9");
-       film->set_name ("ffmpeg_encoder_prores_test9");
        auto c = make_shared<ImageContent>(TestPaths::private_data() / "bbc405.png");
+       auto film = new_test_film2("ffmpeg_encoder_prores_test9", { c });
+       film->set_name ("ffmpeg_encoder_prores_test9");
        film->set_container (Ratio::from_id ("185"));
        film->set_audio_channels (12);
 
index 9dfb0f3dce679f1fd78fd1ef3e3d6fa2d1d00e02..c745335ae2b4dbba571d5b9381e2d538d502b4a5 100644 (file)
@@ -33,7 +33,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 using namespace dcpomatic;
 
 
index 4aa4c1d9aadf387e2874d7a4e71d86591743398f..1f994374d2d23b2fc19a94cd64f785ca472b59ed 100644 (file)
  */
 
 
-#include <boost/test/unit_test.hpp>
-#include "lib/film.h"
-#include "lib/ffmpeg_decoder.h"
-#include "lib/ffmpeg_content.h"
-#include "lib/ffmpeg_audio_stream.h"
 #include "lib/audio_content.h"
+#include "lib/ffmpeg_audio_stream.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/ffmpeg_decoder.h"
+#include "lib/film.h"
 #include "test.h"
+#include <boost/test/unit_test.hpp>
 
 
 using std::make_shared;
index 7175e209ab2a81195530da655bba3e9fc48f1e96..4c29f1919de6ebf7ca91a9c39d55b6711b9a95b4 100644 (file)
@@ -40,7 +40,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 
 
index 610ac03809abf23e61610015d24e9bd7e0671330..d54868b3fbde8ca6ee4ec921cd6fdd6c25b12d17 100644 (file)
 
 */
 
+
 /** @file  test/frame_rate_test.cc
  *  @brief Tests for FrameRateChange and the computation of the best
  *  frame rate for the DCP.
  *  @ingroup feature
  */
 
-#include <boost/test/unit_test.hpp>
-#include "lib/film.h"
+
+#include "lib/audio_content.h"
 #include "lib/config.h"
-#include "lib/ffmpeg_content.h"
-#include "lib/playlist.h"
 #include "lib/ffmpeg_audio_stream.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/film.h"
 #include "lib/frame_rate_change.h"
+#include "lib/playlist.h"
 #include "lib/video_content.h"
-#include "lib/audio_content.h"
 #include "test.h"
+#include <boost/test/unit_test.hpp>
+
 
-using std::shared_ptr;
 
 /* Test Playlist::best_dcp_frame_rate and FrameRateChange
    with a single piece of content.
index 70755f22abc8ec9e2edae3c61e81fa96e98adc0d..39cdfe602dc2a09fe9eff107b415c09512a7b575 100644 (file)
@@ -29,7 +29,6 @@
 
 using std::string;
 using std::list;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (image_content_fade_test)
index 210f32d408eddb17239e37bef9dc311645a8c555..572f31c815ffd6472609d03bcde74e8e7cd8d1a1 100644 (file)
@@ -26,7 +26,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 static const boost::filesystem::path data_file0 = TestPaths::private_data() / "player_seek_test_0.png";
index e759289bee878b621f3d1bff76496d1c7a1719e0..e4545b7b0dc0e7e5eb7d45962ad83f634476e9a3 100644 (file)
@@ -47,7 +47,6 @@
 using std::dynamic_pointer_cast;
 using std::make_shared;
 using std::map;
-using std::shared_ptr;
 using std::string;
 using std::vector;
 
index 2e839336d9ec8458e8384922ff394d2a5e727d1c..f0755d3a0dd69cc0506631455508d4dec1cf1bc2 100644 (file)
@@ -38,7 +38,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 /** Interrupt a DCP encode when it is in progress, as this used to (still does?)
index d7db8999244d54d2dfd5ab01305e386364fd7626..70182f409631489a3386169fa7102583586afeec 100644 (file)
@@ -36,7 +36,6 @@
 
 using std::make_shared;
 using std::string;
-using std::shared_ptr;
 
 
 static void
index c0f73882d71c58a3113af9280c4333a98ea73f7d..afea00d525ebcce2db2b376b215db6a27d1b1dc2 100644 (file)
@@ -37,7 +37,6 @@
 
 using std::string;
 using boost::optional;
-using std::shared_ptr;
 
 
 /** Check that FFOC and LFOC are automatically added if not specified */
index d6a011ff233d494ec28e7a248158f75be7135738..0ad17d7b9e0e8ec0fb6121143b8b93d7a5f28f4d 100644 (file)
@@ -43,7 +43,6 @@
 
 using std::dynamic_pointer_cast;
 using std::make_shared;
-using std::shared_ptr;
 
 
 /** Overlay two video-only bits of content, don't use the video on one and
index 6374d5474015e027e8a3bfc31a3c6695ebc97783..cad7d7d263e0517ba7e1fe15fa5e87aed5877ab8 100644 (file)
@@ -38,7 +38,6 @@
 using std::dynamic_pointer_cast;
 using std::getline;
 using std::ifstream;
-using std::shared_ptr;
 using std::string;
 using std::vector;
 using boost::starts_with;
index 12a26fe609a792a214bc8aafd95c672091f790d2..92002496aec9814651ba39955deec1005ccadd68 100644 (file)
@@ -35,7 +35,6 @@
 #include <dcp/openjpeg_image.h>
 #include <dcp/reel.h>
 #include <dcp/reel_mono_picture_asset.h>
-#include <boost/shared_ptr.hpp>
 #include <boost/test/unit_test.hpp>
 
 
index 047f84b6932d8c8686df86a646fdecf0ea729937..432bdf26f86b61416971c04ef7b007a3b19bc4d6 100644 (file)
 */
 
 
-#include "test.h"
 #include "lib/content.h"
 #include "lib/content_factory.h"
 #include "lib/film.h"
+#include "test.h"
 #include <boost/test/unit_test.hpp>
 
 
-using std::shared_ptr;
-
-
 BOOST_AUTO_TEST_CASE (pulldown_detect_test1)
 {
-       shared_ptr<Film> film = new_test_film2 ("pulldown_detect_test1");
-       shared_ptr<Content> content = content_factory(TestPaths::private_data() / "greatbrain.mkv")[0];
-       film->examine_and_add_content (content);
-       BOOST_REQUIRE (!wait_for_jobs());
-       BOOST_REQUIRE (static_cast<bool>(content->video_frame_rate()));
-       BOOST_CHECK_CLOSE (content->video_frame_rate().get(), 23.976, 0.1);
+       auto content = content_factory(TestPaths::private_data() / "greatbrain.mkv");
+       auto film = new_test_film2("pulldown_detect_test1", content);
+
+       BOOST_REQUIRE(static_cast<bool>(content[0]->video_frame_rate()));
+       BOOST_CHECK_CLOSE(content[0]->video_frame_rate().get(), 23.976, 0.1);
 }
 
index b36dad05a5e9390ef3c394a8b3260a6aea559e3e..0288da1883e1c180c87fe2ab953a67f634b4dab9 100644 (file)
@@ -40,7 +40,6 @@
 
 using std::cout;
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
@@ -58,13 +57,13 @@ note (dcp::NoteType t, string n)
 
 BOOST_AUTO_TEST_CASE (recover_test_2d)
 {
-       shared_ptr<Film> film = new_test_film ("recover_test_2d");
+       auto film = new_test_film("recover_test_2d");
        film->set_interop (false);
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
        film->set_container (Ratio::from_id ("185"));
        film->set_name ("recover_test");
 
-       shared_ptr<FFmpegContent> content (new FFmpegContent("test/data/count300bd24.m2ts"));
+       auto content = make_shared<FFmpegContent>("test/data/count300bd24.m2ts");
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
 
@@ -85,8 +84,8 @@ BOOST_AUTO_TEST_CASE (recover_test_2d)
 
        make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE, dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE });
 
-       shared_ptr<dcp::MonoPictureAsset> A (new dcp::MonoPictureAsset ("build/test/recover_test_2d/original.mxf"));
-       shared_ptr<dcp::MonoPictureAsset> B (new dcp::MonoPictureAsset (video));
+       auto A = make_shared<dcp::MonoPictureAsset>("build/test/recover_test_2d/original.mxf");
+       auto B = make_shared<dcp::MonoPictureAsset>(video);
 
        dcp::EqualityOptions eq;
        BOOST_CHECK (A->equals (B, eq, boost::bind (&note, _1, _2)));
index 092c206f072e1b9a58dbcacf1572e0fe177d781a..7fbf77f74c41423fae4f6ba6ffd5e040c5c60dc8 100644 (file)
@@ -110,21 +110,21 @@ BOOST_AUTO_TEST_CASE (reels_test2)
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
 
        {
-               shared_ptr<ImageContent> c (new ImageContent("test/data/flat_red.png"));
+               auto c = make_shared<ImageContent>("test/data/flat_red.png");
                film->examine_and_add_content (c);
                BOOST_REQUIRE (!wait_for_jobs());
                c->video->set_length (24);
        }
 
        {
-               shared_ptr<ImageContent> c (new ImageContent("test/data/flat_green.png"));
+               auto c = make_shared<ImageContent>("test/data/flat_green.png");
                film->examine_and_add_content (c);
                BOOST_REQUIRE (!wait_for_jobs());
                c->video->set_length (24);
        }
 
        {
-               shared_ptr<ImageContent> c (new ImageContent("test/data/flat_blue.png"));
+               auto c = make_shared<ImageContent>("test/data/flat_blue.png");
                film->examine_and_add_content (c);
                BOOST_REQUIRE (!wait_for_jobs());
                c->video->set_length (24);
@@ -200,7 +200,7 @@ BOOST_AUTO_TEST_CASE (reels_test4)
        /* 4 piece of 1s-long content */
        shared_ptr<ImageContent> content[4];
        for (int i = 0; i < 4; ++i) {
-               content[i].reset (new ImageContent("test/data/flat_green.png"));
+               content[i] = make_shared<ImageContent>("test/data/flat_green.png");
                film->examine_and_add_content (content[i]);
                BOOST_REQUIRE (!wait_for_jobs());
                content[i]->video->set_length (24);
index d2cd54d88a2c875b4016851fea618ac5b142dad8..0a29f94613fe3673efc14579ca72d55a81c3bd3c 100644 (file)
 */
 
 
-#include "lib/ffmpeg_content.h"
+#include "lib/config.h"
 #include "lib/content_factory.h"
-#include "lib/text_content.h"
-#include "lib/job_manager.h"
-#include "lib/film.h"
 #include "lib/dcp_content.h"
 #include "lib/examine_content_job.h"
-#include "lib/config.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/film.h"
+#include "lib/job_manager.h"
+#include "lib/text_content.h"
 #include "test.h"
 #include <boost/test/unit_test.hpp>
 #include <iostream>
 
 
-using std::string;
-using std::vector;
-using std::shared_ptr;
 using std::dynamic_pointer_cast;
 using std::make_shared;
+using std::string;
+using std::vector;
 using boost::optional;
 
 
index 68f5c4ebba0998dcc8a99d0576c971577007602b..57322d3ac3379e4d1dbb0434c21998892c368f9d 100644 (file)
@@ -27,7 +27,6 @@
 #include <boost/test/unit_test.hpp>
 
 
-using std::shared_ptr;
 using std::dynamic_pointer_cast;
 
 
index b43312e59bbbc9c208eea3d97107b2071ed3296a..afdaf48a644da9c10a38b78baa7caabeec747892 100644 (file)
@@ -38,7 +38,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (repeat_frame_test)
index 8a35ce9022bb3a99875020e38895329d084d21d8..db659c2c9ff0d411697bbff5511250bdd741d323 100644 (file)
@@ -34,7 +34,6 @@
 
 using std::dynamic_pointer_cast;
 using std::make_shared;
-using std::shared_ptr;
 
 
 void check_within_n (int64_t a, int64_t b, int64_t n)
index 8009cc9f9418609f5079171e227e3c04ced8228b..3bab146dae74a4ed9d4fcded3e366358169f251b 100644 (file)
@@ -35,7 +35,6 @@
 using std::cout;
 using std::make_shared;
 using std::pair;
-using std::shared_ptr;
 
 
 static void
index d1c5b85338f53272ead9d19e4388a9cea0dd12dc..2099a0923dfdd052439900e07f333718d212f78a 100644 (file)
@@ -1,9 +1,32 @@
-#include "lib/shuffler.h"
-#include "lib/piece.h"
+/*
+    Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    DCP-o-matic is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
 #include "lib/content_video.h"
+#include "lib/piece.h"
+#include "lib/shuffler.h"
 #include <boost/test/unit_test.hpp>
 
+
 using std::list;
+using std::make_shared;
 using std::shared_ptr;
 using std::weak_ptr;
 using boost::optional;
@@ -15,7 +38,7 @@ using namespace boost::placeholders;
 static void
 push (Shuffler& s, int frame, Eyes eyes)
 {
-       shared_ptr<Piece> piece (new Piece (shared_ptr<Content>(), shared_ptr<Decoder>(), FrameRateChange(24, 24)));
+       auto piece = make_shared<Piece>(shared_ptr<Content>(), shared_ptr<Decoder>(), FrameRateChange(24, 24));
        ContentVideo cv;
        cv.frame = frame;
        cv.eyes = eyes;
index 28218e22fa0f9f7e6205cd577fa61e8620a9ac73..dd02d200d7e220b6504612d2c23fc998ca0fcd07 100644 (file)
@@ -43,7 +43,6 @@
 
 using std::make_shared;
 using std::string;
-using std::shared_ptr;
 using boost::lexical_cast;
 
 
index d096e50e505f65783c7ebf1ee083c45f42d7fe9b..4c4098c2a86f3df8d136e0f09577077fac23ad77 100644 (file)
@@ -37,7 +37,6 @@
 #include "lib/video_content.h"
 
 
-using std::shared_ptr;
 using std::make_shared;
 
 
index 7caef52451b09d9ca03f5e5f5d4a14b6971bbd0c..9354628678742c259606a5594f0f9701aaf0cd69 100644 (file)
  */
 
 
-#include "lib/film.h"
-#include "lib/string_text_file_content.h"
 #include "lib/dcp_content_type.h"
+#include "lib/film.h"
 #include "lib/font.h"
 #include "lib/ratio.h"
+#include "lib/string_text_file_content.h"
 #include "lib/text_content.h"
 #include "test.h"
 #include <dcp/smpte_subtitle_asset.h>
 #include <dcp/subtitle_string.h>
-#include <boost/test/unit_test.hpp>
 #include <boost/algorithm/string.hpp>
+#include <boost/test/unit_test.hpp>
 #include <list>
 
 
-using std::string;
 using std::list;
-using std::shared_ptr;
 using std::make_shared;
+using std::shared_ptr;
+using std::string;
 using namespace dcpomatic;
 
 
index 3a1430696ddf3c9cbbe24e66c43a300eb8bb5c8c..8132ba3a0db3aab1283030eaac3c9b3b4034ca2d 100644 (file)
  */
 
 
-#include "lib/film.h"
-#include "lib/string_text_file_content.h"
 #include "lib/dcp_content_type.h"
+#include "lib/film.h"
 #include "lib/font.h"
 #include "lib/ratio.h"
+#include "lib/string_text_file_content.h"
 #include "lib/text_content.h"
 #include "test.h"
 #include <dcp/interop_subtitle_asset.h>
 #include <boost/algorithm/string.hpp>
 
 
-using std::string;
 using std::list;
-using std::shared_ptr;
 using std::make_shared;
+using std::string;
 
 
 /** Make a DCP with subs from a .ssa file */
index fe64e147e3b8b48eeb2e24a33a70cbc02c8e86cc..a180739ab5f8e84fe9cd1223731824345d74263b 100644 (file)
 
 */
 
+
 /** @test  test/stream_test.cc
  *  @brief Some simple tests of FFmpegAudioStream.
  */
 
-#include "lib/film.h"
-#include "lib/ffmpeg_content.h"
+
 #include "lib/ffmpeg_audio_stream.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/film.h"
 #include <libcxml/cxml.h>
 #include <dcp/warnings.h>
 LIBDCP_DISABLE_WARNINGS
@@ -32,14 +34,15 @@ LIBDCP_DISABLE_WARNINGS
 LIBDCP_ENABLE_WARNINGS
 #include <boost/test/unit_test.hpp>
 
-using std::pair;
+
 using std::list;
-using std::shared_ptr;
+using std::pair;
+
 
 BOOST_AUTO_TEST_CASE (stream_test)
 {
        xmlpp::Document doc;
-       xmlpp::Element* root = doc.create_root_node ("FFmpegAudioStream");
+       auto root = doc.create_root_node("FFmpegAudioStream");
        root->add_child("Name")->add_child_text ("hello there world");
        root->add_child("Id")->add_child_text ("4");
        root->add_child("FrameRate")->add_child_text ("44100");
@@ -47,29 +50,29 @@ BOOST_AUTO_TEST_CASE (stream_test)
 
        /* This is the state file version 5 description of the mapping */
 
-       xmlpp::Element* mapping = root->add_child("Mapping");
+       auto mapping = root->add_child("Mapping");
        mapping->add_child("ContentChannels")->add_child_text ("2");
        {
                /* L -> L */
-               xmlpp::Element* map = mapping->add_child ("Map");
+               auto map = mapping->add_child("Map");
                map->add_child("ContentIndex")->add_child_text ("0");
                map->add_child("DCP")->add_child_text ("0");
        }
        {
                /* L -> C */
-               xmlpp::Element* map = mapping->add_child ("Map");
+               auto map = mapping->add_child("Map");
                map->add_child("ContentIndex")->add_child_text ("0");
                map->add_child("DCP")->add_child_text ("2");
        }
        {
                /* R -> R */
-               xmlpp::Element* map = mapping->add_child ("Map");
+               auto map = mapping->add_child("Map");
                map->add_child("ContentIndex")->add_child_text ("1");
                map->add_child("DCP")->add_child_text ("1");
        }
        {
                /* R -> C */
-               xmlpp::Element* map = mapping->add_child ("Map");
+               auto map = mapping->add_child("Map");
                map->add_child("ContentIndex")->add_child_text ("1");
                map->add_child("DCP")->add_child_text ("2");
        }
index 333a895bfdf10bc16653079121f0f0de5fbf6468..84f249c659c45fcea3e289ed13c9ab8e00506725 100644 (file)
@@ -28,7 +28,6 @@
 #include <boost/test/unit_test.hpp>
 
 
-using std::shared_ptr;
 using std::dynamic_pointer_cast;
 
 
index 95fd9da083709876ad41a9437ecf42f315b7c9ef..42ed8858f022aadc4128af149c382b5b459c8607 100644 (file)
@@ -35,7 +35,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE(full_dcp_subtitle_font_id_test)
index 7703a42756ca61686ed22373470f947dc431eafb..442910e901a76e1d8f2849952d0e263d80af694e 100644 (file)
@@ -36,7 +36,6 @@
 
 using std::string;
 using std::vector;
-using std::shared_ptr;
 
 
 BOOST_AUTO_TEST_CASE (subtitle_language_interop_test)
index 91372d2a521cbd0924229fe98e90711b93e8a64b..ce925defbf235ff04331d46931b2454ff152714d 100644 (file)
@@ -31,7 +31,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 using std::vector;
 
 
index 98974f1b3c7db98a39852ecc9367998425c784df..743d809ddfd1847842eb437365086d1ede439043 100644 (file)
@@ -36,7 +36,6 @@
 
 using std::dynamic_pointer_cast;
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 
 
index f22698d1f6c82b3bd9d0b424b3f5f97fbbdf5c2c..d7eb90d251eb45382eff78d2c4a78a2a1213a852 100644 (file)
@@ -19,9 +19,9 @@
 */
 
 #include "lib/content_factory.h"
+#include "lib/dcp_subtitle_content.h"
 #include "lib/film.h"
 #include "lib/image_content.h"
-#include "lib/dcp_subtitle_content.h"
 #include "lib/text_content.h"
 #include "lib/video_content.h"
 #include "test.h"
@@ -35,9 +35,8 @@
 
 
 using std::list;
-using std::string;
-using std::shared_ptr;
 using std::make_shared;
+using std::string;
 using boost::optional;
 
 
@@ -72,7 +71,7 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_test)
        dcp::DCP dcp ("build/test/subtitle_reel_test/" + film->dcp_name());
        dcp.read ();
        BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U);
-       shared_ptr<dcp::CPL> cpl = dcp.cpls().front();
+       auto cpl = dcp.cpls().front();
 
        auto reels = cpl->reels ();
        BOOST_REQUIRE_EQUAL (reels.size(), 2U);
index f0fea4765c5b5a46705ff85ac45555b16f7d72a1..b9eccbb6fd760fa099f05735ea2eeee26b6999cc 100644 (file)
@@ -26,7 +26,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 
 
 /** Check for no crash when trimming DCP subtitles (#1275) */
index 4b6b727d411e295d7248abbd12b81c17c9748cfe..a2e116f9a7aa1802d396cfe05665e0b9665107e1 100644 (file)
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE (threed_test2)
  */
 BOOST_AUTO_TEST_CASE (threed_test3)
 {
-       shared_ptr<Film> film = new_test_film2 ("threed_test3");
+       auto film = new_test_film2 ("threed_test3");
        auto L = make_shared<FFmpegContent>("test/data/test.mp4");
        film->examine_and_add_content (L);
        auto R = make_shared<FFmpegContent>("test/data/test.mp4");
@@ -227,7 +227,7 @@ BOOST_AUTO_TEST_CASE (threed_test7)
  */
 BOOST_AUTO_TEST_CASE (threed_test_separate_files_slightly_different_lengths)
 {
-       shared_ptr<Film> film = new_test_film2 ("threed_test3");
+       auto film = new_test_film2("threed_test3");
        auto L = make_shared<FFmpegContent>("test/data/test.mp4");
        film->examine_and_add_content (L);
        auto R = make_shared<FFmpegContent>("test/data/test.mp4");
@@ -248,7 +248,7 @@ BOOST_AUTO_TEST_CASE (threed_test_separate_files_slightly_different_lengths)
  */
 BOOST_AUTO_TEST_CASE (threed_test_separate_files_very_different_lengths)
 {
-       shared_ptr<Film> film = new_test_film2 ("threed_test3");
+       auto film = new_test_film2("threed_test3");
        auto L = make_shared<FFmpegContent>("test/data/test.mp4");
        film->examine_and_add_content (L);
        auto R = make_shared<FFmpegContent>("test/data/test.mp4");
index a45c144b1c5056fe48e466b36ba1d04b6f89aff4..872e6f885c03580efe104bc833d19622f4babba3 100644 (file)
@@ -35,7 +35,6 @@
 
 
 using std::list;
-using std::shared_ptr;
 using std::string;
 using std::vector;
 #if BOOST_VERSION >= 106100
index e52b11e674abaa91d3e9d512cecedffa470a01b3..259f5403146f29d1260fb85c5c943c5aa13a4316 100644 (file)
@@ -41,7 +41,6 @@
 
 
 using std::make_shared;
-using std::shared_ptr;
 using std::string;
 using std::vector;
 
index ca304071682541fdf77383087c1362cf98035dd2..5edb858820b1dbbae3dd58a1dd9b992a6535899d 100644 (file)
 
 
 
-#include "lib/film.h"
-#include "lib/video_mxf_content.h"
 #include "lib/content_factory.h"
 #include "lib/dcp_content_type.h"
+#include "lib/film.h"
 #include "lib/ratio.h"
+#include "lib/video_mxf_content.h"
 #include "test.h"
 #include <dcp/mono_picture_asset.h>
 #include <boost/test/unit_test.hpp>
 
 
-using std::make_shared;
-using std::shared_ptr;
 using std::dynamic_pointer_cast;
+using std::make_shared;
 
 
 static boost::filesystem::path ref_mxf = "test/data/scaling_test_185_185/j2c_6a2ffab1-9ea5-4428-9027-9d458363c95f.mxf";