diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-30 10:53:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-30 10:53:53 +0100 |
| commit | 38a5ff713757b9dc0cb67cb09613182c46dc9657 (patch) | |
| tree | ef337ee8bcd315b85f3a50ce37f623f3b1c51d76 /test/stl_binary_writer_test.cc | |
| parent | 97495d8cce58f0e5d9a43977698c60b8b66a83e3 (diff) | |
Split up into RawSubtitle and Subtitle, with collect(). Hopefully cleaner.
Diffstat (limited to 'test/stl_binary_writer_test.cc')
| -rw-r--r-- | test/stl_binary_writer_test.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/test/stl_binary_writer_test.cc b/test/stl_binary_writer_test.cc index fafa14f..c29bc9b 100644 --- a/test/stl_binary_writer_test.cc +++ b/test/stl_binary_writer_test.cc @@ -30,61 +30,61 @@ BOOST_AUTO_TEST_CASE (stl_binary_writer_test) { sub::Subtitle s; - s.vertical_position.line = 0; s.from.set_frame (sub::FrameTime (0, 0, 41, 9)); s.to.set_frame (sub::FrameTime (0, 0, 42, 21)); + sub::Line l; + l.vertical_position.line = 0; + sub::Block b; b.text = "This is a subtitle "; b.font = "Arial"; b.font_size.set_points (42); - s.blocks.push_back (b); - } - - { - sub::Subtitle s; - s.vertical_position.line = 1; - s.from.set_frame (sub::FrameTime (0, 0, 41, 9)); - s.to.set_frame (sub::FrameTime (0, 0, 42, 21)); + l.blocks.push_back (b); - sub::Block b; b.text = " and that's a line break"; b.font = "Arial"; b.font_size.set_points (42); - s.blocks.push_back (b); + l.blocks.push_back (b); + + s.lines.push_back (l); + subs.push_back (s); } { sub::Subtitle s; - s.vertical_position.line = 0; s.from.set_frame (sub::FrameTime (0, 1, 1, 1)); s.to.set_frame (sub::FrameTime (0, 1, 2, 10)); + sub::Line l; + l.vertical_position.line = 0; + sub::Block b; b.text = "This is some "; b.font = "Arial"; b.font_size.set_points (42); - s.blocks.push_back (b); + l.blocks.push_back (b); b.text = "bold"; b.bold = true; - s.blocks.push_back (b); + l.blocks.push_back (b); b.text = " and some "; b.bold = false; - s.blocks.push_back (b); + l.blocks.push_back (b); b.text = "bold italic"; b.bold = true; b.italic = true; - s.blocks.push_back (b); + l.blocks.push_back (b); b.text = " and some "; b.bold = false; b.italic = false; b.underline = true; - s.blocks.push_back (b); + l.blocks.push_back (b); + s.lines.push_back (l); subs.push_back (s); } |
