summaryrefslogtreecommitdiff
path: root/test/interop_subtitle_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/interop_subtitle_test.cc')
-rw-r--r--test/interop_subtitle_test.cc145
1 files changed, 58 insertions, 87 deletions
diff --git a/test/interop_subtitle_test.cc b/test/interop_subtitle_test.cc
index 27dcaf23..3b18148b 100644
--- a/test/interop_subtitle_test.cc
+++ b/test/interop_subtitle_test.cc
@@ -86,13 +86,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "My jacket was ",
+ string{"My jacket was "},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 1, 250),
dcp::Time (0, 0, 0, 1, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -112,13 +111,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Idi Amin's",
+ string{"Idi Amin's"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 1, 250),
dcp::Time (0, 0, 0, 1, 250),
- 6,
- {}
+ 6
));
s = subs.texts_during(dcp::Time(0, 0, 7, 190, 250), dcp::Time(0, 0, 7, 191, 250), false);
@@ -141,13 +139,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "My corset was H.M. The Queen's",
+ string{"My corset was H.M. The Queen's"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 1, 250),
dcp::Time (0, 0, 0, 1, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -167,13 +164,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "My large wonderbra",
+ string{"My large wonderbra"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 1, 250),
dcp::Time (0, 0, 0, 1, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 0, 11, 95, 250), dcp::Time (0, 0, 11, 96, 250), false);
@@ -196,13 +192,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Once belonged to the Shah",
+ string{"Once belonged to the Shah"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 1, 250),
dcp::Time (0, 0, 0, 1, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 0, 14, 42, 250), dcp::Time (0, 0, 14, 43, 250), false);
@@ -225,13 +220,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "And these are Roy Hattersley's jeans",
+ string{"And these are Roy Hattersley's jeans"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 1, 250),
dcp::Time (0, 0, 0, 1, 250),
- 0,
- {}
+ 0
));
}
@@ -260,13 +254,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "At afternoon tea with John Peel",
+ string{"At afternoon tea with John Peel"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 0, 250),
dcp::Time (0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -286,13 +279,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "I enquired if his accent was real",
+ string{"I enquired if his accent was real"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 0, 250),
dcp::Time (0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 0, 50, 50, 250), dcp::Time (0, 0, 50, 51, 250), false);
@@ -315,13 +307,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "He said \"out of the house",
+ string{"He said \"out of the house"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 0, 250),
dcp::Time (0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -341,13 +332,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "I'm incredibly scouse",
+ string{"I'm incredibly scouse"},
dcp::Effect::BORDER,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 0, 250),
dcp::Time (0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 1, 2, 300, 250), dcp::Time (0, 1, 2, 301, 250), false);
@@ -370,13 +360,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "At home it depends how I feel.\"",
+ string{"At home it depends how I feel.\""},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -396,13 +385,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "I spent a long weekend in Brighton",
+ string{"I spent a long weekend in Brighton"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 1, 15, 50, 250), dcp::Time (0, 1, 15, 51, 250), false);
@@ -425,13 +413,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::RTL,
- "With the legendary Miss Enid Blyton",
+ string{"With the legendary Miss Enid Blyton"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -451,13 +438,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::TTB,
- "She said \"you be Noddy",
+ string{"She said \"you be Noddy"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 1, 27, 200, 250), dcp::Time (0, 1, 27, 201, 250), false);
@@ -480,13 +466,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::BTT,
- "That curious creature the Sphinx",
+ string{"That curious creature the Sphinx"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -506,13 +491,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Is smarter than anyone thinks",
+ string{"Is smarter than anyone thinks"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 1, 42, 300, 250), dcp::Time (0, 1, 42, 301, 250), false);
@@ -535,13 +519,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "It sits there and smirks",
+ string{"It sits there and smirks"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -561,13 +544,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "And you don't think it works",
+ string{"And you don't think it works"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 1, 45, 200, 250), dcp::Time (0, 1, 45, 201, 250), false);
@@ -590,13 +572,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Then when you're not looking, it winks.",
+ string{"Then when you're not looking, it winks."},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -616,13 +597,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "When it snows you will find Sister Sledge",
+ string{"When it snows you will find Sister Sledge"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during (dcp::Time (0, 1, 47, 249, 250), dcp::Time (0, 1, 47, 250, 250), false);
@@ -645,13 +625,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Out mooning, at night, on the ledge",
+ string{"Out mooning, at night, on the ledge"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -671,13 +650,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "One storey down",
+ string{"One storey down"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
s = subs.texts_during(dcp::Time (0, 2, 6, 210, 250), dcp::Time (0, 2, 6, 211, 250), false);
@@ -700,13 +678,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "HELLO",
+ string{"HELLO"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
BOOST_REQUIRE (dynamic_pointer_cast<const dcp::TextString>(s.back()));
BOOST_CHECK_EQUAL (*dynamic_pointer_cast<const dcp::TextString>(s.back()), dcp::TextString (
@@ -726,13 +703,12 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "WORLD",
+ string{"WORLD"},
dcp::Effect::BORDER,
dcp::Colour(0, 0, 0),
dcp::Time(0, 0, 0, 0, 250),
dcp::Time(0, 0, 0, 0, 250),
- 0,
- {}
+ 0
));
}
@@ -774,13 +750,12 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Hello world",
+ string{"Hello world"},
dcp::Effect::NONE,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 0, 24),
dcp::Time (0, 0, 0, 0, 24),
- 0,
- std::vector<dcp::Ruby>()
+ 0
)
);
@@ -802,13 +777,12 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "What's going ",
+ string{"What's going "},
dcp::Effect::BORDER,
dcp::Colour (1, 2, 3),
dcp::Time (1, 2, 3, 4, 24),
dcp::Time (5, 6, 7, 8, 24),
- 0,
- std::vector<dcp::Ruby>()
+ 0
)
);
@@ -830,13 +804,12 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "on",
+ string{"on"},
dcp::Effect::BORDER,
dcp::Colour (1, 2, 3),
dcp::Time (1, 2, 3, 4, 24),
dcp::Time (5, 6, 7, 8, 24),
- 9,
- std::vector<dcp::Ruby>()
+ 9
)
);
@@ -892,13 +865,12 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "Hello world",
+ string{"Hello world"},
dcp::Effect::NONE,
dcp::Colour (0, 0, 0),
dcp::Time (0, 0, 0, 0, 24),
dcp::Time (0, 0, 0, 0, 24),
- 0,
- std::vector<dcp::Ruby>()
+ 0
)
);
@@ -920,13 +892,12 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test2)
0,
vector<dcp::Text::VariableZPosition>(),
dcp::Direction::LTR,
- "What's going on",
+ string{"What's going on"},
dcp::Effect::BORDER,
dcp::Colour (1, 2, 3),
dcp::Time (1, 2, 3, 4, 24),
dcp::Time (5, 6, 7, 8, 24),
- 0,
- std::vector<dcp::Ruby>()
+ 0
)
);