From: Carl Hetherington Date: Fri, 2 Feb 2018 21:56:27 +0000 (+0000) Subject: A number of unit test fixes. X-Git-Tag: v2.11.48~11 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=1029bec7334fedbd8570cd8bfa5ddf954da8b3ec A number of unit test fixes. --- diff --git a/test/image_test.cc b/test/image_test.cc index 299ef2e51..7780c94cc 100644 --- a/test/image_test.cc +++ b/test/image_test.cc @@ -194,14 +194,14 @@ BOOST_AUTO_TEST_CASE (merge_test1) { int const stride = 48 * 4; - shared_ptr A (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 48), false)); + shared_ptr A (new Image (AV_PIX_FMT_BGRA, dcp::Size (48, 48), false)); A->make_transparent (); uint8_t* a = A->data()[0]; for (int y = 0; y < 48; ++y) { uint8_t* p = a + y * stride; for (int x = 0; x < 16; ++x) { - /* red */ + /* blue */ p[x * 4] = 255; /* opaque */ p[x * 4 + 3] = 255; @@ -219,21 +219,21 @@ BOOST_AUTO_TEST_CASE (merge_test1) /** Test merge (list) with two images */ BOOST_AUTO_TEST_CASE (merge_test2) { - shared_ptr A (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 1), false)); + shared_ptr A (new Image (AV_PIX_FMT_BGRA, dcp::Size (48, 1), false)); A->make_transparent (); uint8_t* a = A->data()[0]; for (int x = 0; x < 16; ++x) { - /* red */ + /* blue */ a[x * 4] = 255; /* opaque */ a[x * 4 + 3] = 255; } - shared_ptr B (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 1), false)); + shared_ptr B (new Image (AV_PIX_FMT_BGRA, dcp::Size (48, 1), false)); B->make_transparent (); uint8_t* b = B->data()[0]; for (int x = 0; x < 16; ++x) { - /* blue */ + /* red */ b[(x + 32) * 4 + 2] = 255; /* opaque */ b[(x + 32) * 4 + 3] = 255; diff --git a/test/import_dcp_test.cc b/test/import_dcp_test.cc index 163a3a4a9..403c1c992 100644 --- a/test/import_dcp_test.cc +++ b/test/import_dcp_test.cc @@ -45,6 +45,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test) A->set_container (Ratio::from_id ("185")); A->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); A->set_name ("frobozz"); + A->set_interop (false); shared_ptr c (new FFmpegContent (A, "test/data/test.mp4")); A->examine_and_add_content (c); @@ -72,6 +73,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test) B->set_container (Ratio::from_id ("185")); B->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); B->set_name ("frobozz"); + B->set_interop (false); shared_ptr d (new DCPContent (B, "build/test/import_dcp_test/" + A->dcp_name())); d->add_kdm (kdm); diff --git a/test/player_test.cc b/test/player_test.cc index 0ddb67afc..1580d5902 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -92,6 +92,7 @@ BOOST_AUTO_TEST_CASE (player_black_fill_test) film->set_name ("black_fill_test"); film->set_container (Ratio::from_id ("185")); film->set_sequence (false); + film->set_interop (false); shared_ptr contentA (new ImageContent (film, "test/data/simple_testcard_640x480.png")); shared_ptr contentB (new ImageContent (film, "test/data/simple_testcard_640x480.png")); diff --git a/test/reels_test.cc b/test/reels_test.cc index bd7b1c06a..9e8e120a6 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -91,6 +91,7 @@ BOOST_AUTO_TEST_CASE (reels_test2) shared_ptr film = new_test_film ("reels_test2"); film->set_name ("reels_test2"); film->set_container (Ratio::from_id ("185")); + film->set_interop (false); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); { @@ -194,6 +195,7 @@ BOOST_AUTO_TEST_CASE (reels_test4) film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); + film->set_interop (false); /* 4 piece of 1s-long content */ shared_ptr content[4]; diff --git a/test/repeat_frame_test.cc b/test/repeat_frame_test.cc index 24075991c..fd64ba018 100644 --- a/test/repeat_frame_test.cc +++ b/test/repeat_frame_test.cc @@ -42,6 +42,7 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test) film->set_name ("repeat_frame_test"); film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); + film->set_interop (false); shared_ptr c (new FFmpegContent (film, "test/data/red_24.mp4")); film->examine_and_add_content (c); diff --git a/test/skip_frame_test.cc b/test/skip_frame_test.cc index 97aadb2f7..fdea35849 100644 --- a/test/skip_frame_test.cc +++ b/test/skip_frame_test.cc @@ -42,6 +42,7 @@ BOOST_AUTO_TEST_CASE (skip_frame_test) film->set_name ("skip_frame_test"); film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); + film->set_interop (false); shared_ptr c (new FFmpegContent (film, "test/data/count300bd48.m2ts")); film->examine_and_add_content (c); diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc index b6df6e393..025972da8 100644 --- a/test/srt_subtitle_test.cc +++ b/test/srt_subtitle_test.cc @@ -46,6 +46,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); film->set_audio_channels (6); + film->set_interop (false); shared_ptr content (new TextSubtitleContent (film, "test/data/subrip2.srt")); film->examine_and_add_content (content); wait_for_jobs (); @@ -67,6 +68,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); film->set_audio_channels (6); + film->set_interop (false); shared_ptr content (new TextSubtitleContent (film, "test/data/subrip2.srt")); film->examine_and_add_content (content); wait_for_jobs (); @@ -118,6 +120,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3) film->set_name ("frobozz"); film->set_interop (true); film->set_audio_channels (6); + film->set_interop (false); shared_ptr content (new TextSubtitleContent (film, private_data / "Ankoemmling_short.srt")); film->examine_and_add_content (content); wait_for_jobs (); @@ -138,6 +141,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test4) film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); + film->set_interop (false); shared_ptr content (new TextSubtitleContent (film, "test/data/subrip2.srt")); content->subtitle->set_use (true); content->subtitle->set_burn (false);