summaryrefslogtreecommitdiff
path: root/test/recover_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
commit5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch)
tree769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /test/recover_test.cc
parent4e83acad0c2a5c528709a175a80261b8147d3b49 (diff)
Use make_shared<>.
Diffstat (limited to 'test/recover_test.cc')
-rw-r--r--test/recover_test.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/recover_test.cc b/test/recover_test.cc
index f9ef8793e..83e83d88d 100644
--- a/test/recover_test.cc
+++ b/test/recover_test.cc
@@ -32,11 +32,13 @@
#include <dcp/mono_picture_asset.h>
#include <dcp/stereo_picture_asset.h>
#include <boost/test/unit_test.hpp>
+#include <boost/make_shared.hpp>
#include <iostream>
using std::cout;
using std::string;
using boost::shared_ptr;
+using boost::make_shared;
static void
note (dcp::NoteType t, string n)
@@ -53,7 +55,7 @@ BOOST_AUTO_TEST_CASE (recover_test_2d)
film->set_container (Ratio::from_id ("185"));
film->set_name ("recover_test");
- shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd24.m2ts"));
+ shared_ptr<FFmpegContent> content = make_shared<FFmpegContent> (film, "test/data/count300bd24.m2ts");
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -71,8 +73,8 @@ BOOST_AUTO_TEST_CASE (recover_test_2d)
film->make_dcp ();
wait_for_jobs ();
- shared_ptr<dcp::MonoPictureAsset> A (new dcp::MonoPictureAsset ("build/test/recover_test_2d/original.mxf"));
- shared_ptr<dcp::MonoPictureAsset> B (new dcp::MonoPictureAsset (video));
+ shared_ptr<dcp::MonoPictureAsset> A = make_shared<dcp::MonoPictureAsset> ("build/test/recover_test_2d/original.mxf");
+ shared_ptr<dcp::MonoPictureAsset> B = make_shared<dcp::MonoPictureAsset> (video);
dcp::EqualityOptions eq;
BOOST_CHECK (A->equals (B, eq, boost::bind (&note, _1, _2)));
@@ -86,7 +88,7 @@ BOOST_AUTO_TEST_CASE (recover_test_3d)
film->set_name ("recover_test");
film->set_three_d (true);
- shared_ptr<ImageContent> content (new ImageContent (film, "test/data/3d_test"));
+ shared_ptr<ImageContent> content = make_shared<ImageContent> (film, "test/data/3d_test");
content->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
film->examine_and_add_content (content);
wait_for_jobs ();
@@ -106,8 +108,8 @@ BOOST_AUTO_TEST_CASE (recover_test_3d)
film->make_dcp ();
wait_for_jobs ();
- shared_ptr<dcp::StereoPictureAsset> A (new dcp::StereoPictureAsset ("build/test/recover_test_3d/original.mxf"));
- shared_ptr<dcp::StereoPictureAsset> B (new dcp::StereoPictureAsset (video));
+ shared_ptr<dcp::StereoPictureAsset> A = make_shared<dcp::StereoPictureAsset> ("build/test/recover_test_3d/original.mxf");
+ shared_ptr<dcp::StereoPictureAsset> B = make_shared<dcp::StereoPictureAsset> (video);
dcp::EqualityOptions eq;
BOOST_CHECK (A->equals (B, eq, boost::bind (&note, _1, _2)));