diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-07-14 02:02:17 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-07-14 02:02:17 +0200 |
| commit | 96d6f783b7dfac04af8a7d77033a3d05e31cfc10 (patch) | |
| tree | 38c78bc2ab560401f20cd9cde7571f3edd5d6f44 /test | |
| parent | e97157fd7fe6767fdc2b1fa32df5b821296907a9 (diff) | |
C++11 tidying.
Diffstat (limited to 'test')
| -rw-r--r-- | test/atmos_test.cc | 4 | ||||
| -rw-r--r-- | test/local_time_test.cc | 9 | ||||
| -rw-r--r-- | test/make_digest_test.cc | 8 | ||||
| -rw-r--r-- | test/mca_test.cc | 6 |
4 files changed, 17 insertions, 10 deletions
diff --git a/test/atmos_test.cc b/test/atmos_test.cc index 1ac0e1f1..a56de7af 100644 --- a/test/atmos_test.cc +++ b/test/atmos_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2015-2019 Carl Hetherington <cth@carlh.net> + Copyright (C) 2015-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -31,11 +31,13 @@ files in the program, then also delete it here. */ + #include "atmos_asset.h" #include "test.h" #include <boost/test/unit_test.hpp> #include <iostream> + /** Check basic read of an Atmos asset */ BOOST_AUTO_TEST_CASE (atmos_read_test) { diff --git a/test/local_time_test.cc b/test/local_time_test.cc index 4ac92240..e80a863d 100644 --- a/test/local_time_test.cc +++ b/test/local_time_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -31,9 +31,11 @@ files in the program, then also delete it here. */ -#include <boost/test/unit_test.hpp> -#include "local_time.h" + #include "exceptions.h" +#include "local_time.h" +#include <boost/test/unit_test.hpp> + /** Check that dcp::LocalTime works */ BOOST_AUTO_TEST_CASE (local_time_basic_test) @@ -139,6 +141,7 @@ BOOST_AUTO_TEST_CASE (local_time_basic_test) } } + BOOST_AUTO_TEST_CASE (local_time_add_minutes_test) { { diff --git a/test/make_digest_test.cc b/test/make_digest_test.cc index 7fefd809..9d37f837 100644 --- a/test/make_digest_test.cc +++ b/test/make_digest_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016-2019 Carl Hetherington <cth@carlh.net> + Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -38,11 +38,13 @@ #include <boost/test/unit_test.hpp> #include <sys/time.h> + void progress (float) { } + /** Check SHA1 digests */ BOOST_AUTO_TEST_CASE (make_digest_test) { @@ -50,12 +52,12 @@ BOOST_AUTO_TEST_CASE (make_digest_test) srand (1); int const N = 256 * 1024 * 1024; dcp::ArrayData data (N); - uint8_t* p = data.data(); + auto p = data.data(); for (int i = 0; i < N; ++i) { *p++ = rand() & 0xff; } data.write ("build/test/random"); /* Hash it */ - BOOST_CHECK_EQUAL (dcp::make_digest ("build/test/random", boost::bind (&progress, _1)), "GKbk/V3fcRtP5MaPdSmAGNbKkaU="); + BOOST_CHECK_EQUAL (dcp::make_digest("build/test/random", boost::bind(&progress, _1)), "GKbk/V3fcRtP5MaPdSmAGNbKkaU="); } diff --git a/test/mca_test.cc b/test/mca_test.cc index bcedce78..12b4f2c6 100644 --- a/test/mca_test.cc +++ b/test/mca_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington <cth@carlh.net> + Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -114,8 +114,8 @@ BOOST_AUTO_TEST_CASE (write_mca_descriptors_to_mxf_test) /* Make a CPL as a roundabout way to read the metadata we just wrote to the MXF */ - shared_ptr<dcp::ReelSoundAsset> reel_sound_asset(new dcp::ReelSoundAsset(sound_asset, 0)); - shared_ptr<dcp::Reel> reel(new dcp::Reel()); + auto reel_sound_asset = make_shared<dcp::ReelSoundAsset>(sound_asset, 0); + auto reel = make_shared<dcp::Reel>(); reel->add (black_picture_asset("build/test/write_mca_descriptors_to_mxf_test", 24)); reel->add (reel_sound_asset); |
