diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-30 13:02:29 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-30 13:02:29 +0100 |
| commit | b365da4229b2a9d0ceef632af6880a38ecb65325 (patch) | |
| tree | b37f7c5d68206c6aab456ec44ac666c7f4b6bdf2 /test | |
| parent | 38a5ff713757b9dc0cb67cb09613182c46dc9657 (diff) | |
Various fixes to STL read/write.
Diffstat (limited to 'test')
| -rw-r--r-- | test/stl_binary_writer_test.cc | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/test/stl_binary_writer_test.cc b/test/stl_binary_writer_test.cc index c29bc9b..05b2cac 100644 --- a/test/stl_binary_writer_test.cc +++ b/test/stl_binary_writer_test.cc @@ -33,21 +33,28 @@ BOOST_AUTO_TEST_CASE (stl_binary_writer_test) 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); - l.blocks.push_back (b); - - b.text = " and that's a line break"; - b.font = "Arial"; - b.font_size.set_points (42); - l.blocks.push_back (b); + { + sub::Block b; + b.text = "This is a subtitle"; + b.font = "Arial"; + b.font_size.set_points (42); + sub::Line l; + l.vertical_position.line = 0; + l.blocks.push_back (b); + s.lines.push_back (l); + } + + { + sub::Block b; + b.text = "and that's a line break"; + b.font = "Arial"; + b.font_size.set_points (42); + sub::Line l; + l.vertical_position.line = 1; + l.blocks.push_back (b); + s.lines.push_back (l); + } - s.lines.push_back (l); subs.push_back (s); } @@ -65,23 +72,17 @@ BOOST_AUTO_TEST_CASE (stl_binary_writer_test) b.font_size.set_points (42); l.blocks.push_back (b); - b.text = "bold"; - b.bold = true; + b.text = "underline"; + b.underline = true; l.blocks.push_back (b); b.text = " and some "; - b.bold = false; + b.underline = false; l.blocks.push_back (b); - b.text = "bold italic"; - b.bold = true; - b.italic = true; - l.blocks.push_back (b); - - b.text = " and some "; - b.bold = false; - b.italic = false; + b.text = "underlined italic"; b.underline = true; + b.italic = true; l.blocks.push_back (b); s.lines.push_back (l); |
