diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-04 21:32:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-07 23:27:56 +0100 |
| commit | a5d004b0773f633401528392fc28e66d70e13ac8 (patch) | |
| tree | 9f83ff2ab353f5a63918210d4930d0ead228375e /test | |
| parent | dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (diff) | |
BOOST_FOREACH.
Diffstat (limited to 'test')
| -rw-r--r-- | test/colour_conversion_test.cc | 3 | ||||
| -rw-r--r-- | test/dcp_subtitle_test.cc | 4 | ||||
| -rw-r--r-- | test/ffmpeg_encoder_test.cc | 2 | ||||
| -rw-r--r-- | test/kdm_naming_test.cc | 2 | ||||
| -rw-r--r-- | test/reels_test.cc | 3 | ||||
| -rw-r--r-- | test/subtitle_reel_number_test.cc | 2 | ||||
| -rw-r--r-- | test/subtitle_reel_test.cc | 5 | ||||
| -rw-r--r-- | test/threed_test.cc | 4 | ||||
| -rw-r--r-- | test/vf_test.cc | 1 |
9 files changed, 11 insertions, 15 deletions
diff --git a/test/colour_conversion_test.cc b/test/colour_conversion_test.cc index f277edd9a..28545b3f0 100644 --- a/test/colour_conversion_test.cc +++ b/test/colour_conversion_test.cc @@ -28,7 +28,6 @@ #include <dcp/gamma_transfer_function.h> #include <libxml++/libxml++.h> #include <boost/test/unit_test.hpp> -#include <boost/foreach.hpp> #include <iostream> using std::cout; @@ -105,7 +104,7 @@ BOOST_AUTO_TEST_CASE (colour_conversion_test3) /** Test a round trip via the XML representation */ BOOST_AUTO_TEST_CASE (colour_conversion_test4) { - BOOST_FOREACH (PresetColourConversion const & i, PresetColourConversion::all ()) { + for (auto const& i: PresetColourConversion::all ()) { xmlpp::Document out; xmlpp::Element* out_root = out.create_root_node ("Test"); i.conversion.as_xml (out_root); diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index a3ef673fe..025d33c6a 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -55,7 +55,7 @@ store (ContentStringText sub) if (!stored) { stored = sub; } else { - BOOST_FOREACH (dcp::SubtitleString i, sub.subs) { + for (auto i: sub.subs) { stored->subs.push_back (i); } } @@ -190,7 +190,7 @@ static void check_font_tags (list<cxml::NodePtr> nodes) { - BOOST_FOREACH (cxml::NodePtr i, nodes) { + for (auto i: nodes) { if (i->name() == "Font") { BOOST_CHECK (!i->optional_string_attribute("Id") || i->string_attribute("Id") != ""); } diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc index 684a67cf5..e43ea76e8 100644 --- a/test/ffmpeg_encoder_test.cc +++ b/test/ffmpeg_encoder_test.cc @@ -303,7 +303,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test6) shared_ptr<Content> subs = content_factory("test/data/subrip.srt").front(); film2->examine_and_add_content (subs); BOOST_REQUIRE (!wait_for_jobs()); - BOOST_FOREACH (shared_ptr<TextContent> i, subs->text) { + for (auto i: subs->text) { i->set_use (true); } diff --git a/test/kdm_naming_test.cc b/test/kdm_naming_test.cc index bd329eeee..85a0b60f6 100644 --- a/test/kdm_naming_test.cc +++ b/test/kdm_naming_test.cc @@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE (directory_kdm_naming_test, * boost::unit_test::depends_on( string const cpl_id = cpls.front().cpl_id; list<KDMWithMetadataPtr> kdms; - BOOST_FOREACH (shared_ptr<dcpomatic::Screen> i, screens) { + for (auto i: screens) { KDMWithMetadataPtr kdm = kdm_for_screen ( film, cpls.front().cpl_file, diff --git a/test/reels_test.cc b/test/reels_test.cc index b609052b9..c7b33d394 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -34,7 +34,6 @@ #include "lib/content_factory.h" #include "test.h" #include <boost/test/unit_test.hpp> -#include <boost/foreach.hpp> #include <iostream> using std::list; @@ -496,7 +495,7 @@ no_op () static void dump_notes (list<dcp::VerificationNote> const & notes) { - BOOST_FOREACH (dcp::VerificationNote i, notes) { + for (auto i: notes) { std::cout << dcp::note_to_string(i) << "\n"; } } diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc index e5f1667ef..d8c596c94 100644 --- a/test/subtitle_reel_number_test.cc +++ b/test/subtitle_reel_number_test.cc @@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) BOOST_REQUIRE_EQUAL (cpl->reels().size(), 6U); int n = 1; - BOOST_FOREACH (shared_ptr<dcp::Reel> i, cpl->reels()) { + for (auto i: cpl->reels()) { if (i->main_subtitle()) { shared_ptr<dcp::InteropSubtitleAsset> ass = dynamic_pointer_cast<dcp::InteropSubtitleAsset>(i->main_subtitle()->asset()); BOOST_REQUIRE (ass); diff --git a/test/subtitle_reel_test.cc b/test/subtitle_reel_test.cc index 6e55ee62f..2eee36ffa 100644 --- a/test/subtitle_reel_test.cc +++ b/test/subtitle_reel_test.cc @@ -31,7 +31,6 @@ #include <dcp/interop_subtitle_asset.h> #include <dcp/reel_closed_caption_asset.h> #include <dcp/reel_subtitle_asset.h> -#include <boost/foreach.hpp> #include <boost/test/unit_test.hpp> @@ -125,7 +124,7 @@ BOOST_AUTO_TEST_CASE (subtitle_in_all_reels_test) shared_ptr<dcp::CPL> cpl = dcp.cpls().front(); BOOST_REQUIRE_EQUAL (cpl->reels().size(), 3U); - BOOST_FOREACH (shared_ptr<dcp::Reel> i, cpl->reels()) { + for (auto i: cpl->reels()) { BOOST_CHECK (i->main_subtitle()); } } @@ -170,7 +169,7 @@ BOOST_AUTO_TEST_CASE (closed_captions_in_all_reels_test) shared_ptr<dcp::CPL> cpl = dcp.cpls().front(); BOOST_REQUIRE_EQUAL (cpl->reels().size(), 3U); - BOOST_FOREACH (shared_ptr<dcp::Reel> i, cpl->reels()) { + for (auto i: cpl->reels()) { BOOST_REQUIRE_EQUAL (i->closed_captions().size(), 2U); optional<string> first = i->closed_captions().front()->language(); optional<string> second = i->closed_captions().back()->language(); diff --git a/test/threed_test.cc b/test/threed_test.cc index e6a91a910..b12eb328d 100644 --- a/test/threed_test.cc +++ b/test/threed_test.cc @@ -198,13 +198,13 @@ BOOST_AUTO_TEST_CASE (threed_test7) while (signal_manager->ui_idle ()) {} std::cout << "Here's the jobs:\n"; - BOOST_FOREACH (shared_ptr<Job> i, jm->_jobs) { + for (auto i: jm->_jobs) { std::cout << i->name() << " " << i->status() << " " << i->is_new() << " " << i->running() << " " << i->finished() << " " << i->finished_ok() << " " << i->finished_in_error() << "\n"; } BOOST_REQUIRE (jm->errors()); shared_ptr<Job> failed; - BOOST_FOREACH (shared_ptr<Job> i, jm->_jobs) { + for (auto i: jm->_jobs) { if (i->finished_in_error()) { BOOST_REQUIRE (!failed); failed = i; diff --git a/test/vf_test.cc b/test/vf_test.cc index 9fc02412a..aff9bdae9 100644 --- a/test/vf_test.cc +++ b/test/vf_test.cc @@ -37,7 +37,6 @@ #include <dcp/reel_picture_asset.h> #include <dcp/reel_sound_asset.h> #include <boost/test/unit_test.hpp> -#include <boost/foreach.hpp> #include <iostream> using std::list; |
