From c96b513ba50e992b237a26fa9fc7eeeaf369635b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 5 May 2022 15:35:03 +0200 Subject: Tidying. --- test/gamma_transfer_function_test.cc | 13 ++++++++----- test/rgb_xyz_test.cc | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/gamma_transfer_function_test.cc b/test/gamma_transfer_function_test.cc index 993f4e9b..6e454b76 100644 --- a/test/gamma_transfer_function_test.cc +++ b/test/gamma_transfer_function_test.cc @@ -31,24 +31,27 @@ files in the program, then also delete it here. */ + #include "gamma_transfer_function.h" #include "modified_gamma_transfer_function.h" #include + +using std::make_shared; using std::shared_ptr; + /** Check GammaTransferFunction::about_equal */ BOOST_AUTO_TEST_CASE (gamma_transfer_function_test) { - shared_ptr a (new dcp::GammaTransferFunction (1.2)); - shared_ptr b (new dcp::GammaTransferFunction (1.2)); + auto a = make_shared(1.2); + auto b = make_shared(1.2); BOOST_CHECK (a->about_equal (b, 1e-6)); - a.reset (new dcp::GammaTransferFunction (1.2)); - a.reset (new dcp::GammaTransferFunction (1.3)); + a = make_shared(1.3); BOOST_CHECK (a->about_equal (b, 0.2)); BOOST_CHECK (!a->about_equal (b, 0.05)); - shared_ptr c (new dcp::ModifiedGammaTransferFunction (2.4, 0.05, 1, 2)); + auto c = make_shared(2.4, 0.05, 1, 2); BOOST_CHECK (!a->about_equal (c, 1)); } diff --git a/test/rgb_xyz_test.cc b/test/rgb_xyz_test.cc index 3e359c0c..8fd478b1 100644 --- a/test/rgb_xyz_test.cc +++ b/test/rgb_xyz_test.cc @@ -31,20 +31,23 @@ files in the program, then also delete it here. */ + #include "rgb_xyz.h" #include "openjpeg_image.h" #include "colour_conversion.h" #include "stream_operators.h" -#include #include +#include #include +#include + -using std::max; -using std::list; -using std::string; using std::cout; -using std::shared_ptr; +using std::list; using std::make_shared; +using std::max; +using std::shared_ptr; +using std::string; using boost::optional; using boost::scoped_array; -- cgit v1.2.3