summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-24 12:24:16 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-24 12:24:16 +0100
commit715410f7b36075b39d712479476e83a28042ed7e (patch)
tree46615302452a954c9d1593b1ba16a705380ad933 /test
parent2c8270716ac21c05b5f7ce0e45096a1e9e62a619 (diff)
Support underlining of subtitles.
Diffstat (limited to 'test')
-rw-r--r--test/data/subs1.xml2
-rw-r--r--test/read_interop_subtitle_test.cc23
-rw-r--r--test/write_subtitle_test.cc8
3 files changed, 30 insertions, 3 deletions
diff --git a/test/data/subs1.xml b/test/data/subs1.xml
index f4a4ded8..ee57db02 100644
--- a/test/data/subs1.xml
+++ b/test/data/subs1.xml
@@ -20,7 +20,7 @@
<Subtitle SpotNumber="3" TimeIn="00:00:11:094" TimeOut="00:00:13:063" FadeUpTime="1" FadeDownTime="1">
<Text VAlign="bottom" VPosition="15.0">Once belonged to the Shah</Text>
</Subtitle>
- <Font Weight="bold">
+ <Font Weight="bold" Underlined="yes">
<Subtitle SpotNumber="4" TimeIn="00:00:13:104" TimeOut="00:00:15:177" FadeUpTime="1" FadeDownTime="1">
<Text VAlign="bottom" VPosition="15.0">And these are Roy Hattersley's jeans</Text>
</Subtitle>
diff --git a/test/read_interop_subtitle_test.cc b/test/read_interop_subtitle_test.cc
index 3ec70296..7febaab4 100644
--- a/test/read_interop_subtitle_test.cc
+++ b/test/read_interop_subtitle_test.cc
@@ -50,6 +50,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -73,6 +74,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -93,6 +95,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -116,6 +119,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -139,6 +143,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
true,
+ true,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -168,6 +173,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -188,6 +194,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -211,6 +218,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -231,6 +239,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -254,6 +263,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -274,6 +284,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -297,6 +308,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -317,6 +329,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -340,6 +353,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -360,6 +374,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -383,6 +398,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -403,6 +419,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -426,6 +443,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -446,6 +464,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -469,6 +488,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -489,6 +509,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -512,6 +533,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -532,6 +554,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
diff --git a/test/write_subtitle_test.cc b/test/write_subtitle_test.cc
index 648d5928..14d19d8b 100644
--- a/test/write_subtitle_test.cc
+++ b/test/write_subtitle_test.cc
@@ -40,6 +40,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
string ("Frutiger"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
48,
1.0,
@@ -63,6 +64,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
boost::optional<string> (),
true,
true,
+ true,
dcp::Colour (128, 0, 64),
91,
1.0,
@@ -95,7 +97,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
" <Text VAlign=\"top\" VPosition=\"80\">Hello world</Text>\n"
" </Subtitle>\n"
" </Font>\n"
- " <Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underlined=\"no\" Weight=\"bold\">\n"
+ " <Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underlined=\"yes\" Weight=\"bold\">\n"
" <Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:218\" TimeOut=\"06:12:15:218\" FadeUpTime=\"930792\" FadeDownTime=\"4591834\">\n"
" <Text VAlign=\"bottom\" VPosition=\"40\">What's going on</Text>\n"
" </Subtitle>\n"
@@ -119,6 +121,7 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test)
string ("Frutiger"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
48,
1.0,
@@ -142,6 +145,7 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test)
boost::optional<string> (),
true,
true,
+ true,
dcp::Colour (128, 0, 64),
91,
1.0,
@@ -179,7 +183,7 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test)
" <dcst:Text Valign=\"top\" Vposition=\"80\">Hello world</dcst:Text>\n"
" </dcst:Subtitle>\n"
" </dcst:Font>\n"
- " <dcst:Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underline=\"no\" Weight=\"bold\">\n"
+ " <dcst:Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underline=\"yes\" Weight=\"bold\">\n"
" <dcst:Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:21\" TimeOut=\"06:12:15:21\" FadeUpTime=\"01:02:03:04\" FadeDownTime=\"05:06:07:08\">\n"
" <dcst:Text Valign=\"bottom\" Vposition=\"40\" Direction=\"rtl\">What's going on</dcst:Text>\n"
" </dcst:Subtitle>\n"