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 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/gamma_transfer_function_test.cc') 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)); } -- cgit v1.2.3