std::shared_ptr
[dcpomatic.git] / test / burnt_subtitle_test.cc
index 8ca43620757006cbc9afd532272d70c904ccd8fe..4a056dbf70e949af532eb6cbe43eeb9d54bc1e34 100644 (file)
@@ -20,7 +20,7 @@
 
 /** @file  test/burnt_subtitle_test.cc
  *  @brief Test the burning of subtitles into the DCP.
- *  @ingroup specific
+ *  @ingroup feature
  */
 
 #include "lib/plain_text_content.h"
@@ -49,8 +49,9 @@
 
 using std::cout;
 using std::map;
-using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
+using std::shared_ptr;
+using std::dynamic_pointer_cast;
+using namespace dcpomatic;
 
 /** Build a small DCP with no picture and a single subtitle overlaid onto it from a SubRip file */
 BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip)
@@ -59,13 +60,13 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
-       shared_ptr<TextCaption> content (new TextCaption (film, "test/data/subrip2.srt"));
+       shared_ptr<StringText> content (new StringText (film, "test/data/subrip2.srt"));
        content->subtitle->set_use (true);
        content->subtitle->set_burn (true);
        film->examine_and_add_content (content);
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
        film->make_dcp ();
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
 
        check_dcp ("test/data/burnt_subtitle_test_subrip", film->dir (film->dcp_name ()));
 }
@@ -80,9 +81,9 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_dcp)
        shared_ptr<DCPTextContent> content (new DCPTextContent (film, "test/data/dcp_sub.xml"));
        content->subtitle->set_use (true);
        film->examine_and_add_content (content);
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
        film->make_dcp ();
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
 
        check_dcp ("test/data/burnt_subtitle_test_dcp", film->dir (film->dcp_name ()));
 }
@@ -106,7 +107,7 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_onto_dcp)
        film2->set_name ("frobozz");
        shared_ptr<DCPContent> background_dcp (new DCPContent(film2, film->dir(film->dcp_name())));
        film2->examine_and_add_content (background_dcp);
-       shared_ptr<TextCaption> sub = dynamic_pointer_cast<TextCaption> (
+       shared_ptr<StringText> sub = dynamic_pointer_cast<StringText> (
                content_factory(film2, "test/data/subrip2.srt").front()
                );
        sub->subtitle->set_burn (true);