Reduce the disk space needed when running tests.
[dcpomatic.git] / test / content_test.cc
index 23fb23865bfe71da1f8f0022bc53e1ba348b30ef..cf34251f5d379206b5e4208a688b9cc74a8177b1 100644 (file)
@@ -23,6 +23,7 @@
  *  @ingroup completedcp
  */
 
+#include "lib/audio_content.h"
 #include "lib/film.h"
 #include "lib/dcp_content_type.h"
 #include "lib/content_factory.h"
@@ -31,7 +32,7 @@
 #include "test.h"
 #include <boost/test/unit_test.hpp>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 using namespace dcpomatic;
 
 /** There has been garbled audio with this piece of content */
@@ -150,3 +151,32 @@ BOOST_AUTO_TEST_CASE (content_test5)
        audio->set_trim_end (dcpomatic::ContentTime(3000));
        BOOST_CHECK (audio->length_after_trim(film) == DCPTime(957000));
 }
+
+
+/** Sync error #1833 */
+BOOST_AUTO_TEST_CASE (content_test6)
+{
+       Cleanup cl;
+
+       auto film = new_test_film2 ("content_test6", &cl);
+       film->examine_and_add_content (content_factory(TestPaths::private_data() / "fha.mkv").front());
+       BOOST_REQUIRE (!wait_for_jobs());
+       film->make_dcp ();
+       BOOST_REQUIRE (!wait_for_jobs());
+       check_dcp (TestPaths::private_data() / "fha", film);
+
+       cl.run ();
+}
+
+
+/** Reel length error when making the test for #1833 */
+BOOST_AUTO_TEST_CASE (content_test7)
+{
+       shared_ptr<Film> film = new_test_film2 ("content_test7");
+       shared_ptr<Content> content = content_factory(TestPaths::private_data() / "clapperboard.mp4").front();
+       film->examine_and_add_content (content);
+       BOOST_REQUIRE (!wait_for_jobs());
+       content->audio->set_delay (-1000);
+       film->make_dcp ();
+       BOOST_REQUIRE (!wait_for_jobs());
+}