summaryrefslogtreecommitdiff
path: root/test/render_subtitles_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-23 11:20:12 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-23 11:20:12 +0100
commitdf17bbd25da69fc38eb2dcd8b4a2531cf0bab0bc (patch)
tree04e6f5917ed3c2e8ea45904ff0235c08d29a6446 /test/render_subtitles_test.cc
parent6f146336b73fe720c83cb75ebdf15e9cb9c02973 (diff)
More automated renaming.
ActiveCaptions -> ActiveText BitmapCaption -> BitmapText ContentCaption -> ContentText ContentTextCaption -> ContentStringText TextCaptionFileContent -> StringTextFileContent TextCaptionFileDecoder -> StringTextFileDecoder TextCaptionFile -> StringTextFile TextCaption -> StringText PlayerCaption -> PlayerText CaptionContent -> TextContent CaptionDecoder -> TextDecoder CaptionPanel -> TextPanel CaptionView -> TextView CaptionAppearanceDialog -> SubtitleAppearanceDialog CaptionType -> TextType
Diffstat (limited to 'test/render_subtitles_test.cc')
-rw-r--r--test/render_subtitles_test.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/render_subtitles_test.cc b/test/render_subtitles_test.cc
index 5b3136497..68b192007 100644
--- a/test/render_subtitles_test.cc
+++ b/test/render_subtitles_test.cc
@@ -28,10 +28,10 @@
#include <boost/test/unit_test.hpp>
static void
-add (std::list<TextCaption>& s, std::string text, bool italic, bool bold, bool underline)
+add (std::list<StringText>& s, std::string text, bool italic, bool bold, bool underline)
{
s.push_back (
- TextCaption (
+ StringText (
dcp::SubtitleString (
boost::optional<std::string> (),
italic,
@@ -60,7 +60,7 @@ add (std::list<TextCaption>& s, std::string text, bool italic, bool bold, bool u
/** Test marked_up() in render_text.cc */
BOOST_AUTO_TEST_CASE (render_markup_test1)
{
- std::list<TextCaption> s;
+ std::list<StringText> s;
add (s, "Hello", false, false, false);
BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>");
}
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test1)
/** Test marked_up() in render_text.cc */
BOOST_AUTO_TEST_CASE (render_markup_test2)
{
- std::list<TextCaption> s;
+ std::list<StringText> s;
add (s, "Hello", false, true, false);
BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span weight=\"bold\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>");
}
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test2)
/** Test marked_up() in render_text.cc */
BOOST_AUTO_TEST_CASE (render_markup_test3)
{
- std::list<TextCaption> s;
+ std::list<StringText> s;
add (s, "Hello", true, true, false);
BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span style=\"italic\" weight=\"bold\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>");
}
@@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test3)
/** Test marked_up() in render_text.cc */
BOOST_AUTO_TEST_CASE (render_markup_test4)
{
- std::list<TextCaption> s;
+ std::list<StringText> s;
add (s, "Hello", true, true, true);
BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span style=\"italic\" weight=\"bold\" underline=\"single\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>");
}
@@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test4)
/** Test marked_up() in render_text.cc */
BOOST_AUTO_TEST_CASE (render_markup_test5)
{
- std::list<TextCaption> s;
+ std::list<StringText> s;
add (s, "Hello", false, true, false);
add (s, " world.", false, false, false);
BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span weight=\"bold\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span><span size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\"> world.</span>");
@@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test5)
/** Test marked_up() in render_text.cc */
BOOST_AUTO_TEST_CASE (render_markup_test6)
{
- std::list<TextCaption> s;
+ std::list<StringText> s;
add (s, "Hello", true, false, false);
add (s, " world ", false, false, false);
add (s, "we are bold.", false, true, false);