More enum class additions.
[dcpomatic.git] / test / digest_test.cc
index 68e443779c1228330b1f35615e8f9bec804d8718..bfa8e62f65456f8b14f8fc00340f19b3480804c1 100644 (file)
@@ -20,7 +20,7 @@
 
 /** @file  test/digest_test.cc
  *  @brief Check computed DCP digests against references calculated by the `openssl` binary.
- *  @ingroup specific
+ *  @ingroup feature
  */
 
 #include "lib/film.h"
@@ -36,7 +36,7 @@
 
 using std::list;
 using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
 
 static string
 openssl_hash (boost::filesystem::path file)
@@ -69,20 +69,19 @@ BOOST_AUTO_TEST_CASE (digest_test)
        film->examine_and_add_content (r);
        film->examine_and_add_content (g);
        film->examine_and_add_content (b);
-       film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
+       film->set_reel_type (ReelType::BY_VIDEO_CONTENT);
        BOOST_REQUIRE (!wait_for_jobs());
 
-       Config::instance()->set_master_encoding_threads (4);
+       BOOST_CHECK (Config::instance()->master_encoding_threads() > 1);
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs());
-       Config::instance()->set_master_encoding_threads (1);
 
        dcp::DCP dcp (film->dir (film->dcp_name ()));
        dcp.read ();
-       BOOST_CHECK_EQUAL (dcp.cpls().size(), 1);
-       list<shared_ptr<dcp::Reel> > reels = dcp.cpls().front()->reels ();
+       BOOST_CHECK_EQUAL (dcp.cpls().size(), 1U);
+       auto reels = dcp.cpls()[0]->reels();
 
-       list<shared_ptr<dcp::Reel> >::const_iterator i = reels.begin ();
+       auto i = reels.begin ();
        BOOST_REQUIRE (i != reels.end ());
        BOOST_REQUIRE ((*i)->main_picture()->hash());
        BOOST_REQUIRE ((*i)->main_picture()->asset()->file());