projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use make_shared<>.
[dcpomatic.git]
/
test
/
film_metadata_test.cc
diff --git
a/test/film_metadata_test.cc
b/test/film_metadata_test.cc
index 423bc4cccd7467c1532fe9d5190b1e2977199fba..d61f5f0d186e86b2cd10dcaac951f95fc77097b4 100644
(file)
--- a/
test/film_metadata_test.cc
+++ b/
test/film_metadata_test.cc
@@
-1,19
+1,20
@@
/*
Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
/*
Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
- This program is free software; you can redistribute it and/or modify
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
This program
is distributed in the hope that it will be useful,
+
DCP-o-matic
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
*/
*/
@@
-21,17
+22,19
@@
* @brief Test some basic reading/writing of film metadata.
*/
* @brief Test some basic reading/writing of film metadata.
*/
-#include <boost/test/unit_test.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/date_time.hpp>
#include "lib/film.h"
#include "lib/dcp_content_type.h"
#include "lib/ratio.h"
#include "test.h"
#include "lib/film.h"
#include "lib/dcp_content_type.h"
#include "lib/ratio.h"
#include "test.h"
+#include <boost/test/unit_test.hpp>
+#include <boost/filesystem.hpp>
+#include <boost/date_time.hpp>
+#include <boost/make_shared.hpp>
using std::string;
using std::list;
using boost::shared_ptr;
using std::string;
using std::list;
using boost::shared_ptr;
+using boost::make_shared;
BOOST_AUTO_TEST_CASE (film_metadata_test)
{
BOOST_AUTO_TEST_CASE (film_metadata_test)
{
@@
-52,7
+55,7
@@
BOOST_AUTO_TEST_CASE (film_metadata_test)
ignore.push_back ("Key");
check_xml ("test/data/metadata.xml.ref", dir.string() + "/metadata.xml", ignore);
ignore.push_back ("Key");
check_xml ("test/data/metadata.xml.ref", dir.string() + "/metadata.xml", ignore);
- shared_ptr<Film> g
(new Film (dir)
);
+ shared_ptr<Film> g
= make_shared<Film> (dir
);
g->read_metadata ();
BOOST_CHECK_EQUAL (g->name(), "fred");
g->read_metadata ();
BOOST_CHECK_EQUAL (g->name(), "fred");