X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=test%2Fimage_proxy_test.cc;h=a9872b958047c30f162f7f414e8dd836530d655d;hp=73ab8cb4c426869f181290850e5675294a162109;hb=689fa55d1529ad88449ca464e9107c4dcc54d1cb;hpb=64bd18216738052c150770561f8f78e13ca792b8 diff --git a/test/image_proxy_test.cc b/test/image_proxy_test.cc index 73ab8cb4c..a9872b958 100644 --- a/test/image_proxy_test.cc +++ b/test/image_proxy_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -22,15 +22,15 @@ #include "lib/ffmpeg_image_proxy.h" #include "lib/j2k_image_proxy.h" #include "test.h" -#include #include -using boost::shared_ptr; +using std::make_shared; +using std::shared_ptr; static const boost::filesystem::path data_file0 = TestPaths::private_data() / "player_seek_test_0.png"; -static const boost::filesystem::path data_file1 = TestPaths::private_data9) / "player_seek_test_1.png"; +static const boost::filesystem::path data_file1 = TestPaths::private_data() / "player_seek_test_1.png"; BOOST_AUTO_TEST_CASE (j2k_image_proxy_same_test) @@ -38,14 +38,14 @@ BOOST_AUTO_TEST_CASE (j2k_image_proxy_same_test) /* The files don't matter here, we just need some data to compare */ { - shared_ptr proxy1(new J2KImageProxy(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); - shared_ptr proxy2(new J2KImageProxy(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); + auto proxy1 = make_shared(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); + auto proxy2 = make_shared(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); BOOST_CHECK (proxy1->same(proxy2)); } { - shared_ptr proxy1(new J2KImageProxy(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); - shared_ptr proxy2(new J2KImageProxy(data_file1, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48)); + auto proxy1 = make_shared(data_file0, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); + auto proxy2 = make_shared(data_file1, dcp::Size(1998, 1080), AV_PIX_FMT_RGB48); BOOST_CHECK (!proxy1->same(proxy2)); } } @@ -54,14 +54,14 @@ BOOST_AUTO_TEST_CASE (j2k_image_proxy_same_test) BOOST_AUTO_TEST_CASE (ffmpeg_image_proxy_same_test) { { - shared_ptr proxy1(new FFmpegImageProxy(data_file0, VIDEO_RANGE_FULL)); - shared_ptr proxy2(new FFmpegImageProxy(data_file0, VIDEO_RANGE_FULL)); + auto proxy1 = make_shared(data_file0, VideoRange::FULL); + auto proxy2 = make_shared(data_file0, VideoRange::FULL); BOOST_CHECK (proxy1->same(proxy2)); } { - shared_ptr proxy1(new FFmpegImageProxy(data_file0, VIDEO_RANGE_FULL)); - shared_ptr proxy2(new FFmpegImageProxy(data_file1, VIDEO_RANGE_FULL)); + auto proxy1 = make_shared(data_file0, VideoRange::FULL); + auto proxy2 = make_shared(data_file1, VideoRange::FULL); BOOST_CHECK (!proxy1->same(proxy2)); } }