Some tidying up of test Doxygen.
[dcpomatic.git] / test / digest_test.cc
index ce3edb95e55b89c33c5966d9307e7042cb2102b3..b1effc9061ba13f261811d9200f4d64c36fe2390 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"
@@ -63,33 +63,38 @@ BOOST_AUTO_TEST_CASE (digest_test)
        shared_ptr<Film> film = new_test_film ("digest_test");
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_name ("digest_test");
-       shared_ptr<ImageContent> r (new ImageContent (film, "test/data/flat_red.png"));
-       shared_ptr<ImageContent> g (new ImageContent (film, "test/data/flat_green.png"));
-       shared_ptr<ImageContent> b (new ImageContent (film, "test/data/flat_blue.png"));
+       shared_ptr<ImageContent> r (new ImageContent("test/data/flat_red.png"));
+       shared_ptr<ImageContent> g (new ImageContent("test/data/flat_green.png"));
+       shared_ptr<ImageContent> b (new ImageContent("test/data/flat_blue.png"));
        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);
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
 
-       Config::instance()->set_master_encoding_threads (4);
+       BOOST_CHECK (Config::instance()->master_encoding_threads() > 1);
        film->make_dcp ();
-       wait_for_jobs ();
-       Config::instance()->set_master_encoding_threads (1);
+       BOOST_REQUIRE (!wait_for_jobs());
 
        dcp::DCP dcp (film->dir (film->dcp_name ()));
        dcp.read ();
-       BOOST_CHECK_EQUAL (dcp.cpls().size(), 1);
+       BOOST_CHECK_EQUAL (dcp.cpls().size(), 1U);
        list<shared_ptr<dcp::Reel> > reels = dcp.cpls().front()->reels ();
 
        list<shared_ptr<dcp::Reel> >::const_iterator i = reels.begin ();
        BOOST_REQUIRE (i != reels.end ());
+       BOOST_REQUIRE ((*i)->main_picture()->hash());
+       BOOST_REQUIRE ((*i)->main_picture()->asset()->file());
        BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file().get()));
        ++i;
        BOOST_REQUIRE (i != reels.end ());
+       BOOST_REQUIRE ((*i)->main_picture()->hash());
+       BOOST_REQUIRE ((*i)->main_picture()->asset()->file());
        BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file().get()));
        ++i;
        BOOST_REQUIRE (i != reels.end ());
+       BOOST_REQUIRE ((*i)->main_picture()->hash());
+       BOOST_REQUIRE ((*i)->main_picture()->asset()->file());
        BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file().get()));
        ++i;
        BOOST_REQUIRE (i == reels.end ());