From b29eb5107c5e77fe01e43010e1582e733f6ceea1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 29 Sep 2020 20:55:16 +0200 Subject: [PATCH] Fix incorrect sign on boost test constants. --- platform/osx/set_paths.sh | 2 +- test/audio_analysis_test.cc | 2 +- test/audio_mapping_test.cc | 2 +- test/audio_merger_test.cc | 10 ++-- test/closed_caption_test.cc | 10 ++-- test/create_cli_test.cc | 8 +-- test/dcp_subtitle_test.cc | 6 +-- test/dcpomatic_time_test.cc | 10 ++-- test/digest_test.cc | 2 +- test/empty_test.cc | 6 +-- test/import_dcp_test.cc | 8 +-- test/isdcf_name_test.cc | 2 +- test/no_use_video_test.cc | 12 ++--- test/player_test.cc | 6 +-- test/reel_writer_test.cc | 12 ++--- test/reels_test.cc | 28 +++++------ test/subtitle_reel_number_test.cc | 4 +- test/subtitle_reel_test.cc | 8 +-- test/time_calculation_test.cc | 82 +++++++++++++++---------------- test/torture_test.cc | 4 +- test/util_test.cc | 6 +-- test/vf_test.cc | 22 ++++----- 22 files changed, 126 insertions(+), 126 deletions(-) diff --git a/platform/osx/set_paths.sh b/platform/osx/set_paths.sh index 5a84a82d9..68db2e2b2 100644 --- a/platform/osx/set_paths.sh +++ b/platform/osx/set_paths.sh @@ -1,4 +1,4 @@ -base=$HOME/dcpomatic +base=$HOME/test env=$HOME/osx-environment sdk=$HOME/SDK diff --git a/test/audio_analysis_test.cc b/test/audio_analysis_test.cc index 2f51f7c4f..4613f4aea 100644 --- a/test/audio_analysis_test.cc +++ b/test/audio_analysis_test.cc @@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_serialisation_test) } } - BOOST_REQUIRE_EQUAL (b.sample_peak().size(), 3); + BOOST_REQUIRE_EQUAL (b.sample_peak().size(), 3U); for (int i = 0; i < channels; ++i) { BOOST_CHECK_CLOSE (b.sample_peak()[i].peak, peak[i].peak, 1); BOOST_CHECK_EQUAL (b.sample_peak()[i].time.get(), peak[i].time.get()); diff --git a/test/audio_mapping_test.cc b/test/audio_mapping_test.cc index 0565429fb..0acc922b6 100644 --- a/test/audio_mapping_test.cc +++ b/test/audio_mapping_test.cc @@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (audio_mapping_test) } list mapped = four.mapped_output_channels (); - BOOST_CHECK_EQUAL (mapped.size(), 1); + BOOST_CHECK_EQUAL (mapped.size(), 1U); BOOST_CHECK_EQUAL (mapped.front(), 1); four.make_zero (); diff --git a/test/audio_merger_test.cc b/test/audio_merger_test.cc index 2ac42964a..3a274ff1a 100644 --- a/test/audio_merger_test.cc +++ b/test/audio_merger_test.cc @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE (audio_merger_test1) push (merger, 0, 64, 22); list, DCPTime> > tb = merger.pull (DCPTime::from_frames (22, sampling_rate)); - BOOST_REQUIRE (tb.size() == 1); + BOOST_REQUIRE (tb.size() == 1U); BOOST_CHECK (tb.front().first != shared_ptr ()); BOOST_CHECK_EQUAL (tb.front().first->frames(), 22); BOOST_CHECK_EQUAL (tb.front().second.get(), 0); @@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (audio_merger_test1) } tb = merger.pull (DCPTime::from_frames (22 + 64, sampling_rate)); - BOOST_REQUIRE (tb.size() == 1); + BOOST_REQUIRE (tb.size() == 1U); BOOST_CHECK_EQUAL (tb.front().first->frames(), 64); BOOST_CHECK_EQUAL (tb.front().second.get(), DCPTime::from_frames(22, sampling_rate).get()); @@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE (audio_merger_test2) /* There's nothing from 0 to 9 */ list, DCPTime> > tb = merger.pull (DCPTime::from_frames (9, sampling_rate)); - BOOST_CHECK_EQUAL (tb.size(), 0); + BOOST_CHECK_EQUAL (tb.size(), 0U); /* Then there's our data at 9 */ tb = merger.pull (DCPTime::from_frames (9 + 64, sampling_rate)); @@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE (audio_merger_test3) /* Get them back */ list, DCPTime> > tb = merger.pull (DCPTime::from_frames (100, sampling_rate)); - BOOST_REQUIRE (tb.size() == 1); + BOOST_REQUIRE (tb.size() == 1U); BOOST_CHECK_EQUAL (tb.front().first->frames(), 64); BOOST_CHECK_EQUAL (tb.front().second.get(), DCPTime::from_frames(17, sampling_rate).get()); for (int i = 0; i < 64; ++i) { @@ -133,7 +133,7 @@ BOOST_AUTO_TEST_CASE (audio_merger_test3) } tb = merger.pull (DCPTime::from_frames (200, sampling_rate)); - BOOST_REQUIRE (tb.size() == 1); + BOOST_REQUIRE (tb.size() == 1U); BOOST_CHECK_EQUAL (tb.front().first->frames(), 64); BOOST_CHECK_EQUAL (tb.front().second.get(), DCPTime::from_frames(114, sampling_rate).get()); for (int i = 0; i < 64; ++i) { diff --git a/test/closed_caption_test.cc b/test/closed_caption_test.cc index b50430d48..283ce6b93 100644 --- a/test/closed_caption_test.cc +++ b/test/closed_caption_test.cc @@ -51,8 +51,8 @@ BOOST_AUTO_TEST_CASE (closed_caption_test1) dcp::DCP check (film->dir(film->dcp_name())); check.read (); - BOOST_REQUIRE_EQUAL (check.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (check.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (check.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (check.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (!check.cpls().front()->reels().front()->closed_captions().empty()); } @@ -81,10 +81,10 @@ BOOST_AUTO_TEST_CASE (closed_caption_test2) dcp::DCP check (film->dir(film->dcp_name())); check.read (); - BOOST_REQUIRE_EQUAL (check.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (check.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (check.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (check.cpls().front()->reels().size(), 1U); list > ccaps = check.cpls().front()->reels().front()->closed_captions(); - BOOST_REQUIRE_EQUAL (ccaps.size(), 3); + BOOST_REQUIRE_EQUAL (ccaps.size(), 3U); list >::const_iterator i = ccaps.begin (); BOOST_CHECK_EQUAL ((*i)->annotation_text(), "First track"); diff --git a/test/create_cli_test.cc b/test/create_cli_test.cc index e88e0820b..747f0f045 100644 --- a/test/create_cli_test.cc +++ b/test/create_cli_test.cc @@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE (create_cli_test) BOOST_CHECK_EQUAL (cc.still_length, 42); BOOST_REQUIRE (cc.output_dir); BOOST_CHECK_EQUAL (*cc.output_dir, "flaps"); - BOOST_REQUIRE_EQUAL (cc.content.size(), 3); + BOOST_REQUIRE_EQUAL (cc.content.size(), 3U); BOOST_CHECK_EQUAL (cc.content[0].path, "fred"); BOOST_CHECK_EQUAL (cc.content[0].frame_type, VIDEO_FRAME_TYPE_2D); BOOST_CHECK_EQUAL (cc.content[1].path, "jim"); @@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE (create_cli_test) BOOST_CHECK_EQUAL (cc.content[2].frame_type, VIDEO_FRAME_TYPE_2D); cc = run ("dcpomatic2_create --left-eye left.mp4 --right-eye right.mp4"); - BOOST_REQUIRE_EQUAL (cc.content.size(), 2); + BOOST_REQUIRE_EQUAL (cc.content.size(), 2U); BOOST_CHECK_EQUAL (cc.content[0].path, "left.mp4"); BOOST_CHECK_EQUAL (cc.content[0].frame_type, VIDEO_FRAME_TYPE_3D_LEFT); BOOST_CHECK_EQUAL (cc.content[1].path, "right.mp4"); @@ -144,13 +144,13 @@ BOOST_AUTO_TEST_CASE (create_cli_test) BOOST_CHECK_EQUAL (cc.fourk, false); cc = run ("dcpomatic2_create --fourk foo.mp4"); - BOOST_REQUIRE_EQUAL (cc.content.size(), 1); + BOOST_REQUIRE_EQUAL (cc.content.size(), 1U); BOOST_CHECK_EQUAL (cc.content[0].path, "foo.mp4"); BOOST_CHECK_EQUAL (cc.fourk, true); BOOST_CHECK (!cc.error); cc = run ("dcpomatic2_create --j2k-bandwidth 120 foo.mp4"); - BOOST_REQUIRE_EQUAL (cc.content.size(), 1); + BOOST_REQUIRE_EQUAL (cc.content.size(), 1U); BOOST_CHECK_EQUAL (cc.content[0].path, "foo.mp4"); BOOST_REQUIRE (cc.j2k_bandwidth); BOOST_CHECK_EQUAL (*cc.j2k_bandwidth, 120000000); diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 80dacbb47..17b997fbc 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test) while (!decoder->pass() && !stored) {} BOOST_REQUIRE (stored); - BOOST_REQUIRE_EQUAL (stored->subs.size(), 2); + BOOST_REQUIRE_EQUAL (stored->subs.size(), 2U); BOOST_CHECK_EQUAL (stored->subs.front().text(), "Noch mal."); BOOST_CHECK_EQUAL (stored->subs.back().text(), "Encore une fois."); } @@ -180,7 +180,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test4) cxml::Document doc ("DCSubtitle"); doc.read_file (subtitle_file (film)); - BOOST_REQUIRE_EQUAL (doc.node_children("LoadFont").size(), 1); + BOOST_REQUIRE_EQUAL (doc.node_children("LoadFont").size(), 1U); } static @@ -213,7 +213,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test5) cxml::Document doc ("DCSubtitle"); doc.read_file (subtitle_file(film)); - BOOST_REQUIRE_EQUAL (doc.node_children("LoadFont").size(), 1); + BOOST_REQUIRE_EQUAL (doc.node_children("LoadFont").size(), 1U); BOOST_CHECK (doc.node_children("LoadFont").front()->string_attribute("Id") != ""); check_font_tags (doc.node_children()); diff --git a/test/dcpomatic_time_test.cc b/test/dcpomatic_time_test.cc index 5b58c369b..b343a1376 100644 --- a/test/dcpomatic_time_test.cc +++ b/test/dcpomatic_time_test.cc @@ -244,7 +244,7 @@ BOOST_AUTO_TEST_CASE (dcpomatic_time_period_coalesce_test1) p.push_back (A); p.push_back (B); list q = coalesce (p); - BOOST_REQUIRE_EQUAL (q.size(), 2); + BOOST_REQUIRE_EQUAL (q.size(), 2U); BOOST_CHECK (q.front() == DCPTimePeriod(DCPTime(14), DCPTime(29))); BOOST_CHECK (q.back () == DCPTimePeriod(DCPTime(45), DCPTime(91))); } @@ -257,7 +257,7 @@ BOOST_AUTO_TEST_CASE (dcpomatic_time_period_coalesce_test2) p.push_back (A); p.push_back (B); list q = coalesce (p); - BOOST_REQUIRE_EQUAL (q.size(), 1); + BOOST_REQUIRE_EQUAL (q.size(), 1U); BOOST_CHECK (q.front() == DCPTimePeriod(DCPTime(14), DCPTime(91))); } @@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE (dcpomatic_time_period_coalesce_test3) p.push_back (A); p.push_back (B); list q = coalesce (p); - BOOST_REQUIRE_EQUAL (q.size(), 1); + BOOST_REQUIRE_EQUAL (q.size(), 1U); BOOST_CHECK (q.front() == DCPTimePeriod(DCPTime(14), DCPTime(91))); } @@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE (dcpomatic_time_period_coalesce_test4) p.push_back (B); p.push_back (C); list q = coalesce (p); - BOOST_REQUIRE_EQUAL (q.size(), 1); + BOOST_REQUIRE_EQUAL (q.size(), 1U); BOOST_CHECK (q.front() == DCPTimePeriod(DCPTime(14), DCPTime(106))); } @@ -297,7 +297,7 @@ BOOST_AUTO_TEST_CASE (dcpomatic_time_period_coalesce_test5) p.push_back (B); p.push_back (C); list q = coalesce (p); - BOOST_REQUIRE_EQUAL (q.size(), 2); + BOOST_REQUIRE_EQUAL (q.size(), 2U); BOOST_CHECK (q.front() == DCPTimePeriod(DCPTime(14), DCPTime(91))); BOOST_CHECK (q.back() == DCPTimePeriod(DCPTime(100), DCPTime(106))); } diff --git a/test/digest_test.cc b/test/digest_test.cc index 2911a43b3..5fee9e734 100644 --- a/test/digest_test.cc +++ b/test/digest_test.cc @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE (digest_test) dcp::DCP dcp (film->dir (film->dcp_name ())); dcp.read (); - BOOST_CHECK_EQUAL (dcp.cpls().size(), 1); + BOOST_CHECK_EQUAL (dcp.cpls().size(), 1U); list > reels = dcp.cpls().front()->reels (); list >::const_iterator i = reels.begin (); diff --git a/test/empty_test.cc b/test/empty_test.cc index 1588a9948..60427ca40 100644 --- a/test/empty_test.cc +++ b/test/empty_test.cc @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE (empty_test1) contentB->set_position (film, DCPTime::from_frames (7, vfr)); Empty black (film, film->playlist(), bind(&has_video, _1), film->playlist()->length(film)); - BOOST_REQUIRE_EQUAL (black._periods.size(), 2); + BOOST_REQUIRE_EQUAL (black._periods.size(), 2U); list::const_iterator i = black._periods.begin(); BOOST_CHECK (i->from == DCPTime::from_frames(0, vfr)); BOOST_CHECK (i->to == DCPTime::from_frames(2, vfr)); @@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (empty_test2) contentB->set_position (film, DCPTime::from_frames(7, vfr)); Empty black (film, film->playlist(), bind(&has_video, _1), film->playlist()->length(film)); - BOOST_REQUIRE_EQUAL (black._periods.size(), 1); + BOOST_REQUIRE_EQUAL (black._periods.size(), 1U); BOOST_CHECK (black._periods.front().from == DCPTime::from_frames(3, vfr)); BOOST_CHECK (black._periods.front().to == DCPTime::from_frames(7, vfr)); @@ -138,7 +138,7 @@ BOOST_AUTO_TEST_CASE (empty_test3) shared_ptr playlist (new Playlist); playlist->add (film, contentB); Empty black (film, playlist, bind(&has_video, _1), playlist->length(film)); - BOOST_REQUIRE_EQUAL (black._periods.size(), 1); + BOOST_REQUIRE_EQUAL (black._periods.size(), 1U); BOOST_CHECK (black._periods.front().from == DCPTime::from_frames(0, vfr)); BOOST_CHECK (black._periods.front().to == DCPTime::from_frames(7, vfr)); diff --git a/test/import_dcp_test.cc b/test/import_dcp_test.cc index ad6fc88ca..2f33f93f5 100644 --- a/test/import_dcp_test.cc +++ b/test/import_dcp_test.cc @@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_markers_test) BOOST_REQUIRE (!wait_for_jobs()); film2->write_metadata (); - BOOST_CHECK_EQUAL (imported->markers().size(), 3); + BOOST_CHECK_EQUAL (imported->markers().size(), 3U); map markers = imported->markers(); BOOST_REQUIRE(markers.find(dcp::FFOC) != markers.end()); @@ -138,11 +138,11 @@ BOOST_AUTO_TEST_CASE (import_dcp_markers_test) /* Load that film and check that the markers have been loaded */ shared_ptr film3(new Film(boost::filesystem::path("build/test/import_dcp_markers_test2"))); film3->read_metadata (); - BOOST_REQUIRE (film3->content().size() == 1); + BOOST_REQUIRE_EQUAL (film3->content().size(), 1U); shared_ptr reloaded = dynamic_pointer_cast(film3->content().front()); BOOST_REQUIRE (reloaded); - BOOST_CHECK_EQUAL (reloaded->markers().size(), 3); + BOOST_CHECK_EQUAL (reloaded->markers().size(), 3U); markers = reloaded->markers(); BOOST_REQUIRE(markers.find(dcp::FFOC) != markers.end()); @@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_metadata_test) /* Load that film and check that the metadata has been loaded */ shared_ptr film3(new Film(boost::filesystem::path("build/test/import_dcp_metadata_test2"))); film3->read_metadata (); - BOOST_REQUIRE (film3->content().size() == 1); + BOOST_REQUIRE_EQUAL (film3->content().size(), 1U); shared_ptr reloaded = dynamic_pointer_cast(film3->content().front()); BOOST_REQUIRE (reloaded); diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index f5d6ff6d3..bdb21bfcc 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -70,7 +70,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) film->set_audio_channels (1); film->set_resolution (RESOLUTION_4K); shared_ptr text = content_factory("test/data/subrip.srt").front(); - BOOST_REQUIRE_EQUAL (text->text.size(), 1); + BOOST_REQUIRE_EQUAL (text->text.size(), 1U); text->text.front()->set_language ("fr"); text->text.front()->set_burn (true); film->examine_and_add_content (text); diff --git a/test/no_use_video_test.cc b/test/no_use_video_test.cc index 2577f935b..d2589d123 100644 --- a/test/no_use_video_test.cc +++ b/test/no_use_video_test.cc @@ -136,20 +136,20 @@ BOOST_AUTO_TEST_CASE (no_use_video_test3) dcp::DCP ov_a_check (ov_a->dir(ov_a->dcp_name())); ov_a_check.read (); - BOOST_REQUIRE_EQUAL (ov_a_check.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (ov_a_check.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (ov_a_check.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (ov_a_check.cpls().front()->reels().size(), 1U); shared_ptr ov_a_reel (ov_a_check.cpls().front()->reels().front()); dcp::DCP ov_b_check (ov_b->dir(ov_b->dcp_name())); ov_b_check.read (); - BOOST_REQUIRE_EQUAL (ov_b_check.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (ov_b_check.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (ov_b_check.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (ov_b_check.cpls().front()->reels().size(), 1U); shared_ptr ov_b_reel (ov_b_check.cpls().front()->reels().front()); dcp::DCP vf_check (vf->dir(vf->dcp_name())); vf_check.read (); - BOOST_REQUIRE_EQUAL (vf_check.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (vf_check.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (vf_check.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (vf_check.cpls().front()->reels().size(), 1U); shared_ptr vf_reel (vf_check.cpls().front()->reels().front()); BOOST_CHECK_EQUAL (vf_reel->main_picture()->asset_ref().id(), ov_b_reel->main_picture()->asset_ref().id()); diff --git a/test/player_test.cc b/test/player_test.cc index 2e979eb44..a68d76083 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -151,9 +151,9 @@ BOOST_AUTO_TEST_CASE (player_subframe_test) shared_ptr player (new Player(film)); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_black._periods.size(), 1); + BOOST_REQUIRE_EQUAL (player->_black._periods.size(), 1U); BOOST_CHECK (player->_black._periods.front() == DCPTimePeriod(DCPTime::from_frames(3 * 24, 24), DCPTime::from_frames(3 * 24 + 1, 24))); - BOOST_REQUIRE_EQUAL (player->_silent._periods.size(), 1); + BOOST_REQUIRE_EQUAL (player->_silent._periods.size(), 1U); BOOST_CHECK (player->_silent._periods.front() == DCPTimePeriod(DCPTime(289920), DCPTime::from_frames(3 * 24 + 1, 24))); } @@ -318,7 +318,7 @@ BOOST_AUTO_TEST_CASE (player_ignore_video_and_audio_test) player->Text.connect (bind (&store, &out, _1, _2, _3, _4)); while (!player->pass ()) {} - BOOST_CHECK_EQUAL (out.size(), 6); + BOOST_CHECK_EQUAL (out.size(), 6U); } /** Trigger a crash due to the assertion failure in Player::emit_audio */ diff --git a/test/reel_writer_test.cc b/test/reel_writer_test.cc index 5177a5c2f..51c820ba3 100644 --- a/test/reel_writer_test.cc +++ b/test/reel_writer_test.cc @@ -116,8 +116,8 @@ BOOST_AUTO_TEST_CASE (reel_reuse_video_test) /* Find main picture and sound asset IDs */ dcp::DCP dcp1 (film->dir(film->dcp_name())); dcp1.read (); - BOOST_REQUIRE_EQUAL (dcp1.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (dcp1.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (dcp1.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (dcp1.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (dcp1.cpls().front()->reels().front()->main_picture()); BOOST_REQUIRE (dcp1.cpls().front()->reels().front()->main_sound()); string const picture_id = dcp1.cpls().front()->reels().front()->main_picture()->asset()->id(); @@ -131,8 +131,8 @@ BOOST_AUTO_TEST_CASE (reel_reuse_video_test) /* Video ID should be the same, sound different */ dcp::DCP dcp2 (film->dir(film->dcp_name())); dcp2.read (); - BOOST_REQUIRE_EQUAL (dcp2.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (dcp2.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (dcp2.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (dcp2.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (dcp2.cpls().front()->reels().front()->main_picture()); BOOST_REQUIRE (dcp2.cpls().front()->reels().front()->main_sound()); BOOST_CHECK_EQUAL (picture_id, dcp2.cpls().front()->reels().front()->main_picture()->asset()->id()); @@ -146,8 +146,8 @@ BOOST_AUTO_TEST_CASE (reel_reuse_video_test) /* Video and sound IDs should be different */ dcp::DCP dcp3 (film->dir(film->dcp_name())); dcp3.read (); - BOOST_REQUIRE_EQUAL (dcp3.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (dcp3.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (dcp3.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (dcp3.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (dcp3.cpls().front()->reels().front()->main_picture()); BOOST_REQUIRE (dcp3.cpls().front()->reels().front()->main_sound()); BOOST_CHECK (picture_id != dcp3.cpls().front()->reels().front()->main_picture()->asset()->id()); diff --git a/test/reels_test.cc b/test/reels_test.cc index 8bf63199b..41e206366 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -59,13 +59,13 @@ BOOST_AUTO_TEST_CASE (reels_test1) film->set_reel_type (REELTYPE_SINGLE); list r = film->reels (); - BOOST_CHECK_EQUAL (r.size(), 1); + BOOST_CHECK_EQUAL (r.size(), 1U); BOOST_CHECK_EQUAL (r.front().from.get(), 0); BOOST_CHECK_EQUAL (r.front().to.get(), 288000 * 2); film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); r = film->reels (); - BOOST_CHECK_EQUAL (r.size(), 2); + BOOST_CHECK_EQUAL (r.size(), 2U); BOOST_CHECK_EQUAL (r.front().from.get(), 0); BOOST_CHECK_EQUAL (r.front().to.get(), 288000); BOOST_CHECK_EQUAL (r.back().from.get(), 288000); @@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE (reels_test1) /* This is just over 2.5s at 100Mbit/s; should correspond to 60 frames */ film->set_reel_length (31253154); r = film->reels (); - BOOST_CHECK_EQUAL (r.size(), 3); + BOOST_CHECK_EQUAL (r.size(), 3U); list::const_iterator i = r.begin (); BOOST_CHECK_EQUAL (i->from.get(), 0); BOOST_CHECK_EQUAL (i->to.get(), DCPTime::from_frames(60, 24).get()); @@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE (reels_test2) } film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); - BOOST_CHECK_EQUAL (film->reels().size(), 3); + BOOST_CHECK_EQUAL (film->reels().size(), 3U); BOOST_REQUIRE (!wait_for_jobs()); film->make_dcp (); @@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE (reels_test2) BOOST_REQUIRE (!wait_for_jobs ()); list r = film2->reels (); - BOOST_CHECK_EQUAL (r.size(), 3); + BOOST_CHECK_EQUAL (r.size(), 3U); list::const_iterator i = r.begin (); BOOST_CHECK_EQUAL (i->from.get(), 0); BOOST_CHECK_EQUAL (i->to.get(), 96000); @@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE (reels_test3) BOOST_REQUIRE (!wait_for_jobs()); list reels = film->reels(); - BOOST_REQUIRE_EQUAL (reels.size(), 4); + BOOST_REQUIRE_EQUAL (reels.size(), 4U); list::const_iterator i = reels.begin (); BOOST_CHECK_EQUAL (i->from.get(), 0); BOOST_CHECK_EQUAL (i->to.get(), 96000); @@ -217,7 +217,7 @@ BOOST_AUTO_TEST_CASE (reels_test4) BOOST_REQUIRE (!wait_for_jobs()); list reels = film->reels(); - BOOST_REQUIRE_EQUAL (reels.size(), 4); + BOOST_REQUIRE_EQUAL (reels.size(), 4U); list::const_iterator i = reels.begin (); BOOST_CHECK_EQUAL (i->from.get(), 0); BOOST_CHECK_EQUAL (i->to.get(), 96000); @@ -250,7 +250,7 @@ BOOST_AUTO_TEST_CASE (reels_test5) { list p = dcp->reels (film); - BOOST_REQUIRE_EQUAL (p.size(), 4); + BOOST_REQUIRE_EQUAL (p.size(), 4U); list::const_iterator i = p.begin(); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 96000))); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 96000), DCPTime(4000 + 192000))); @@ -261,7 +261,7 @@ BOOST_AUTO_TEST_CASE (reels_test5) { dcp->set_trim_start (ContentTime::from_seconds (0.5)); list p = dcp->reels (film); - BOOST_REQUIRE_EQUAL (p.size(), 4); + BOOST_REQUIRE_EQUAL (p.size(), 4U); list::const_iterator i = p.begin(); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 48000))); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 48000), DCPTime(4000 + 144000))); @@ -272,7 +272,7 @@ BOOST_AUTO_TEST_CASE (reels_test5) { dcp->set_trim_end (ContentTime::from_seconds (0.5)); list p = dcp->reels (film); - BOOST_REQUIRE_EQUAL (p.size(), 4); + BOOST_REQUIRE_EQUAL (p.size(), 4U); list::const_iterator i = p.begin(); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 48000))); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 48000), DCPTime(4000 + 144000))); @@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE (reels_test5) { dcp->set_trim_start (ContentTime::from_seconds (1.5)); list p = dcp->reels (film); - BOOST_REQUIRE_EQUAL (p.size(), 3); + BOOST_REQUIRE_EQUAL (p.size(), 3U); list::const_iterator i = p.begin(); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 0), DCPTime(4000 + 48000))); BOOST_CHECK (*i++ == DCPTimePeriod (DCPTime(4000 + 48000), DCPTime(4000 + 144000))); @@ -329,7 +329,7 @@ BOOST_AUTO_TEST_CASE (reels_test7) A->video->set_length (2 * 24); film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); - BOOST_REQUIRE_EQUAL (film->reels().size(), 2); + BOOST_REQUIRE_EQUAL (film->reels().size(), 2U); BOOST_CHECK (film->reels().front() == DCPTimePeriod(DCPTime(0), DCPTime::from_frames(2 * 24, 24))); BOOST_CHECK (film->reels().back() == DCPTimePeriod(DCPTime::from_frames(2 * 24, 24), DCPTime::from_frames(3 * 24 + 1, 24))); @@ -439,7 +439,7 @@ BOOST_AUTO_TEST_CASE (reels_test11) BOOST_CHECK_EQUAL (A->end(film).get(), DCPTime::from_seconds(1 + 10).get()); list r = film->reels (); - BOOST_CHECK_EQUAL (r.size(), 2); + BOOST_CHECK_EQUAL (r.size(), 2U); BOOST_CHECK_EQUAL (r.front().from.get(), 0); BOOST_CHECK_EQUAL (r.front().to.get(), DCPTime::from_seconds(1).get()); BOOST_CHECK_EQUAL (r.back().from.get(), DCPTime::from_seconds(1).get()); @@ -471,7 +471,7 @@ BOOST_AUTO_TEST_CASE (reels_test12) B->set_position (film, DCPTime::from_seconds(14)); list r = film->reels (); - BOOST_REQUIRE_EQUAL (r.size(), 4); + BOOST_REQUIRE_EQUAL (r.size(), 4U); list::const_iterator i = r.begin (); BOOST_CHECK_EQUAL (i->from.get(), 0); diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc index 0726ee2e4..23e03b7bc 100644 --- a/test/subtitle_reel_number_test.cc +++ b/test/subtitle_reel_number_test.cc @@ -56,9 +56,9 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) dcp::DCP dcp ("build/test/subtitle_reel_number_test/" + film->dcp_name()); dcp.read (); - BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1); + BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U); shared_ptr cpl = dcp.cpls().front(); - BOOST_REQUIRE_EQUAL (cpl->reels().size(), 6); + BOOST_REQUIRE_EQUAL (cpl->reels().size(), 6U); int n = 1; BOOST_FOREACH (shared_ptr i, cpl->reels()) { diff --git a/test/subtitle_reel_test.cc b/test/subtitle_reel_test.cc index 7a722b460..156581932 100644 --- a/test/subtitle_reel_test.cc +++ b/test/subtitle_reel_test.cc @@ -64,11 +64,11 @@ 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(), 1); + BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U); shared_ptr cpl = dcp.cpls().front(); list > reels = cpl->reels (); - BOOST_REQUIRE_EQUAL (reels.size(), 2); + BOOST_REQUIRE_EQUAL (reels.size(), 2U); list >::const_iterator i = reels.begin (); BOOST_REQUIRE ((*i)->main_subtitle()); BOOST_REQUIRE ((*i)->main_subtitle()->asset()); @@ -80,8 +80,8 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_test) shared_ptr B = boost::dynamic_pointer_cast((*i)->main_subtitle()->asset()); BOOST_REQUIRE (B); - BOOST_REQUIRE_EQUAL (A->subtitles().size(), 1); - BOOST_REQUIRE_EQUAL (B->subtitles().size(), 1); + BOOST_REQUIRE_EQUAL (A->subtitles().size(), 1U); + BOOST_REQUIRE_EQUAL (B->subtitles().size(), 1U); /* These times should be the same as they are should be offset from the start of the reel */ BOOST_CHECK (A->subtitles().front()->in() == B->subtitles().front()->in()); diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc index dbcf2677b..636f452d9 100644 --- a/test/time_calculation_test.cc +++ b/test/time_calculation_test.cc @@ -198,7 +198,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); shared_ptr piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.5)), 12); @@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.50)), 0); @@ -224,7 +224,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.50)), 0); @@ -241,7 +241,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.6)), 15); @@ -253,7 +253,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.60)), 0); @@ -270,7 +270,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.60)), 0); @@ -289,7 +289,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.5)), 12); @@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.50)), 0); @@ -315,7 +315,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.50)), 0); @@ -333,7 +333,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.5)), 24); @@ -345,7 +345,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.50)), 0); @@ -359,7 +359,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime::from_seconds (0.50)), 0); @@ -373,7 +373,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content->set_video_frame_rate (29.9978733); film->set_video_frame_rate (30); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_content_video (piece, DCPTime (3200)), 1); @@ -404,7 +404,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); shared_ptr piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 0).get(), 0); BOOST_CHECK_EQUAL (player->content_video_to_dcp (piece, 12).get(), DCPTime::from_seconds(0.5).get()); @@ -416,7 +416,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(4.50).get()); @@ -428,7 +428,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(1.50).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(3.00).get()); @@ -444,7 +444,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 0); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 15).get(), DCPTime::from_seconds(0.6).get()); @@ -456,7 +456,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 40).get(), DCPTime::from_seconds(4.60).get()); @@ -468,7 +468,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (25); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 142080); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 40).get(), 295680); @@ -486,7 +486,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 0); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 12).get(), DCPTime::from_seconds(0.5).get()); @@ -498,7 +498,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(4.50).get()); @@ -510,7 +510,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (24); film->set_video_frame_rate (48); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(1.50).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 36).get(), DCPTime::from_seconds(3.00).get()); @@ -527,7 +527,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), 0); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 24).get(), DCPTime::from_seconds(0.5).get()); @@ -539,7 +539,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(3.00).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(4.50).get()); @@ -551,7 +551,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content->set_video_frame_rate (48); film->set_video_frame_rate (24); player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 0).get(), DCPTime::from_seconds(1.50).get()); BOOST_CHECK_EQUAL (player->content_video_to_dcp(piece, 72).get(), DCPTime::from_seconds(3.00).get()); @@ -582,7 +582,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); shared_ptr piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.5)), 24000); @@ -595,7 +595,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -610,7 +610,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -625,7 +625,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.6)), 28800); @@ -638,7 +638,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.60)), 0); @@ -655,7 +655,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.60)), 0); @@ -674,7 +674,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (48); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.5)), 24000); @@ -687,7 +687,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -702,7 +702,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (48); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.5)), 24000); @@ -733,7 +733,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -748,7 +748,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -763,7 +763,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.5)), 24000); @@ -776,7 +776,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -791,7 +791,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 0); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime::from_seconds (0.50)), 0); @@ -806,7 +806,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); - BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1); + BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); piece = player->_pieces.front (); BOOST_CHECK_EQUAL (player->dcp_to_resampled_audio (piece, DCPTime ()), 54143L * 48000); } diff --git a/test/torture_test.cc b/test/torture_test.cc index 979e1beb8..27b4b5d14 100644 --- a/test/torture_test.cc +++ b/test/torture_test.cc @@ -90,9 +90,9 @@ BOOST_AUTO_TEST_CASE (torture_test1) dcp.read (); list > cpls = dcp.cpls (); - BOOST_REQUIRE_EQUAL (cpls.size(), 1); + BOOST_REQUIRE_EQUAL (cpls.size(), 1U); list > reels = cpls.front()->reels (); - BOOST_REQUIRE_EQUAL (reels.size(), 1); + BOOST_REQUIRE_EQUAL (reels.size(), 1U); /* Check sound */ diff --git a/test/util_test.cc b/test/util_test.cc index 1c1091f28..610555ad6 100644 --- a/test/util_test.cc +++ b/test/util_test.cc @@ -98,9 +98,9 @@ BOOST_AUTO_TEST_CASE (tidy_for_filename_test) BOOST_AUTO_TEST_CASE (utf8_strlen_test) { - BOOST_CHECK_EQUAL (utf8_strlen("hello world"), 11); - BOOST_CHECK_EQUAL (utf8_strlen("hëllo world"), 11); - BOOST_CHECK_EQUAL (utf8_strlen("hëłlo wørld"), 11); + BOOST_CHECK_EQUAL (utf8_strlen("hello world"), 11U); + BOOST_CHECK_EQUAL (utf8_strlen("hëllo world"), 11U); + BOOST_CHECK_EQUAL (utf8_strlen("hëłlo wørld"), 11U); } #ifdef DCPOMATIC_VARIANT_SWAROOP diff --git a/test/vf_test.cc b/test/vf_test.cc index 6fd0a00e8..e0d328447 100644 --- a/test/vf_test.cc +++ b/test/vf_test.cc @@ -127,8 +127,8 @@ BOOST_AUTO_TEST_CASE (vf_test2) dcp::DCP ov_c (ov->dir (ov->dcp_name ())); ov_c.read (); - BOOST_REQUIRE_EQUAL (ov_c.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (ov_c.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (ov_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (ov_c.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (ov_c.cpls().front()->reels().front()->main_picture()); string const pic_id = ov_c.cpls().front()->reels().front()->main_picture()->id(); BOOST_REQUIRE (ov_c.cpls().front()->reels().front()->main_sound()); @@ -137,8 +137,8 @@ BOOST_AUTO_TEST_CASE (vf_test2) dcp::DCP vf_c (vf->dir (vf->dcp_name ())); vf_c.read (); - BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (vf_c.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (vf_c.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (vf_c.cpls().front()->reels().front()->main_picture()); BOOST_CHECK_EQUAL (vf_c.cpls().front()->reels().front()->main_picture()->id(), pic_id); BOOST_REQUIRE (vf_c.cpls().front()->reels().front()->main_sound()); @@ -184,8 +184,8 @@ BOOST_AUTO_TEST_CASE (vf_test3) dcp::DCP vf_c (vf->dir (vf->dcp_name ())); vf_c.read (); - BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (vf_c.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (vf_c.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (vf_c.cpls().front()->reels().front()->main_picture()); BOOST_CHECK_EQUAL (vf_c.cpls().front()->reels().front()->main_picture()->entry_point().get_value_or(0), 24); BOOST_CHECK_EQUAL (vf_c.cpls().front()->reels().front()->main_picture()->actual_duration(), 72); @@ -234,8 +234,8 @@ BOOST_AUTO_TEST_CASE (vf_test4) dcp::DCP ov_c (ov->dir (ov->dcp_name ())); ov_c.read (); - BOOST_REQUIRE_EQUAL (ov_c.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (ov_c.cpls().front()->reels().size(), 1); + BOOST_REQUIRE_EQUAL (ov_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (ov_c.cpls().front()->reels().size(), 1U); BOOST_REQUIRE (ov_c.cpls().front()->reels().front()->main_picture()); string const pic_id = ov_c.cpls().front()->reels().front()->main_picture()->id(); BOOST_REQUIRE (ov_c.cpls().front()->reels().front()->main_sound()); @@ -244,8 +244,8 @@ BOOST_AUTO_TEST_CASE (vf_test4) dcp::DCP vf_c (vf->dir (vf->dcp_name ())); vf_c.read (); - BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1); - BOOST_REQUIRE_EQUAL (vf_c.cpls().front()->reels().size(), 2); + BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL (vf_c.cpls().front()->reels().size(), 2U); BOOST_REQUIRE (vf_c.cpls().front()->reels().back()->main_picture()); BOOST_CHECK_EQUAL (vf_c.cpls().front()->reels().back()->main_picture()->id(), pic_id); BOOST_REQUIRE (vf_c.cpls().front()->reels().back()->main_sound()); @@ -289,7 +289,7 @@ BOOST_AUTO_TEST_CASE (vf_test5) /* Check that the selected reel assets are right */ shared_ptr player (new Player(vf)); list a = player->get_reel_assets(); - BOOST_REQUIRE_EQUAL (a.size(), 4); + BOOST_REQUIRE_EQUAL (a.size(), 4U); list::const_iterator i = a.begin(); BOOST_CHECK (i->period == DCPTimePeriod(DCPTime(0), DCPTime(960000))); ++i; -- 2.30.2