diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-09 02:34:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-09 02:34:23 +0100 |
| commit | 844067ead3acb85f68bcf9e879841a3d813db75d (patch) | |
| tree | 3322e36de152e2d2abaf8c10229dc06e600a8b7d | |
| parent | 7bb241e6857f5f3614fd3b8722d545e85a6b6316 (diff) | |
Very basic SMPTE image test.bitmap-subs
| -rw-r--r-- | test/read_interop_subtitle_test.cc | 2 | ||||
| -rw-r--r-- | test/read_smpte_subtitle_test.cc | 14 |
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")); +} |
