summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/read_interop_subtitle_test.cc2
-rw-r--r--test/read_smpte_subtitle_test.cc14
2 files changed, 14 insertions, 2 deletions
diff --git a/test/read_interop_subtitle_test.cc b/test/read_interop_subtitle_test.cc
index 79010f7a..f111b80b 100644
--- a/test/read_interop_subtitle_test.cc
+++ b/test/read_interop_subtitle_test.cc
@@ -606,5 +606,5 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test3)
BOOST_REQUIRE_EQUAL (subs.subtitles().size(), 1);
shared_ptr<dcp::SubtitleImage> si = dynamic_pointer_cast<dcp::SubtitleImage>(subs.subtitles().front());
BOOST_REQUIRE (si);
- BOOST_CHECK (si->png_image() == dcp::Data("test/data/822bd341-c751-45b1-94d2-410e4ffcff1b.png"));
+ BOOST_CHECK (si->png_image() == dcp::Data("test/data/sub.png"));
}
diff --git a/test/read_smpte_subtitle_test.cc b/test/read_smpte_subtitle_test.cc
index ff2432e4..3f785001 100644
--- a/test/read_smpte_subtitle_test.cc
+++ b/test/read_smpte_subtitle_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2018 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -21,6 +21,7 @@
#include "test.h"
#include "local_time.h"
#include "smpte_load_font_node.h"
+#include "subtitle_image.h"
#include <boost/test/unit_test.hpp>
#include <boost/optional.hpp>
#include <boost/optional/optional_io.hpp>
@@ -105,3 +106,14 @@ BOOST_AUTO_TEST_CASE (read_smpte_subtitle_test2)
BOOST_CHECK_EQUAL (is->text(), " line!");
BOOST_CHECK (!is->italic());
}
+
+/** And another one featuring image subtitles */
+BOOST_AUTO_TEST_CASE (read_smpte_subtitle_test3)
+{
+ dcp::SMPTESubtitleAsset subs ("test/data/subs.mxf");
+
+ BOOST_REQUIRE_EQUAL (subs.subtitles().size(), 1);
+ shared_ptr<dcp::SubtitleImage> si = dynamic_pointer_cast<dcp::SubtitleImage>(subs.subtitles().front());
+ BOOST_REQUIRE (si);
+ BOOST_CHECK (si->png_image() == dcp::Data("test/data/sub.png"));
+}