Fix typos in operator=
[dcpomatic.git] / test / optimise_stills_test.cc
index 7bd7f3b8543aaf51e9f8ff574fffe7ed3c00f341..cec864e0fe4203579fd5b7a17694436e087005fe 100644 (file)
@@ -28,6 +28,7 @@
 #include "lib/dcp_content_type.h"
 #include "lib/content.h"
 #include "lib/video_content.h"
+#include "lib/dcpomatic_log.h"
 #include "test.h"
 #include <boost/test/unit_test.hpp>
 #include <boost/algorithm/string.hpp>
@@ -38,15 +39,16 @@ using std::string;
 using std::vector;
 using boost::starts_with;
 using boost::split;
-using boost::dynamic_pointer_cast;
-using boost::shared_ptr;
+using std::dynamic_pointer_cast;
+using std::shared_ptr;
 
 static
 void
 check (string name, int check_full, int check_repeat)
 {
        /* The encoder will have been destroyed so parse the logs */
-       ifstream log ("build/test/" + name + "/log");
+       string log_file = "build/test/" + name + "/log";
+       ifstream log (log_file.c_str());
        string line;
        int repeat = 0;
        int full = 0;
@@ -71,10 +73,11 @@ check (string name, int check_full, int check_repeat)
 BOOST_AUTO_TEST_CASE (optimise_stills_test1)
 {
        shared_ptr<Film> film = new_test_film ("optimise_stills_test1");
+       LogSwitcher ls (film->log());
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
-       shared_ptr<Content> content = content_factory(film, "test/data/flat_red.png").front ();
+       shared_ptr<Content> content = content_factory("test/data/flat_red.png").front ();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
        film->make_dcp ();
@@ -87,13 +90,14 @@ BOOST_AUTO_TEST_CASE (optimise_stills_test1)
 BOOST_AUTO_TEST_CASE (optimise_stills_test2)
 {
        shared_ptr<Film> film = new_test_film ("optimise_stills_test2");
+       LogSwitcher ls (film->log());
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
-       shared_ptr<Content> content = content_factory(film, "test/data/flat_red.png").front ();
+       shared_ptr<Content> content = content_factory("test/data/flat_red.png").front ();
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs ());
-       content->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
+       content->video->set_frame_type (VideoFrameType::THREE_D_LEFT_RIGHT);
        film->set_three_d (true);
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());