diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-05-05 15:35:03 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-05-05 21:09:40 +0200 |
| commit | c96b513ba50e992b237a26fa9fc7eeeaf369635b (patch) | |
| tree | 86181f6fa38727c6d011b03a6a8bca3c825c8f69 | |
| parent | a43d2a3283c5e5dcbdb40154b5701deec7966fd5 (diff) | |
Tidying.
| -rw-r--r-- | test/gamma_transfer_function_test.cc | 13 | ||||
| -rw-r--r-- | test/rgb_xyz_test.cc | 13 |
2 files changed, 16 insertions, 10 deletions
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 <boost/test/unit_test.hpp> + +using std::make_shared; using std::shared_ptr; + /** Check GammaTransferFunction::about_equal */ BOOST_AUTO_TEST_CASE (gamma_transfer_function_test) { - shared_ptr<dcp::GammaTransferFunction> a (new dcp::GammaTransferFunction (1.2)); - shared_ptr<dcp::GammaTransferFunction> b (new dcp::GammaTransferFunction (1.2)); + auto a = make_shared<dcp::GammaTransferFunction>(1.2); + auto b = make_shared<dcp::GammaTransferFunction>(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<dcp::GammaTransferFunction>(1.3); BOOST_CHECK (a->about_equal (b, 0.2)); BOOST_CHECK (!a->about_equal (b, 0.05)); - shared_ptr<dcp::ModifiedGammaTransferFunction> c (new dcp::ModifiedGammaTransferFunction (2.4, 0.05, 1, 2)); + auto c = make_shared<dcp::ModifiedGammaTransferFunction>(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 <boost/test/unit_test.hpp> #include <boost/bind.hpp> +#include <boost/random.hpp> #include <boost/scoped_array.hpp> +#include <boost/test/unit_test.hpp> + -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; |
