summaryrefslogtreecommitdiff
path: root/test/scc_reader_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/scc_reader_test.cc')
-rw-r--r--test/scc_reader_test.cc24
1 files changed, 23 insertions, 1 deletions
diff --git a/test/scc_reader_test.cc b/test/scc_reader_test.cc
index 1c55032..10444f7 100644
--- a/test/scc_reader_test.cc
+++ b/test/scc_reader_test.cc
@@ -26,7 +26,7 @@
#include <boost/filesystem.hpp>
-BOOST_AUTO_TEST_CASE(scc_reader_test)
+BOOST_AUTO_TEST_CASE(scc_reader_test1)
{
auto file = private_test / "mir.scc";
auto f = fopen(file.string().c_str(), "r");
@@ -37,6 +37,28 @@ BOOST_AUTO_TEST_CASE(scc_reader_test)
for (auto sub: subs) {
for (auto line: sub.lines) {
+ std::cout << ">Line " << *line.vertical_position.line << "\n";
+ for (auto block: line.blocks) {
+ std::cout << block.text << "\n";
+ }
+ }
+ }
+}
+
+
+BOOST_AUTO_TEST_CASE(scc_reader_test2)
+{
+ auto file = private_test / "NIKI•TOMI•BETO Surround captions_CEA-608_English.scc";
+ auto f = fopen(file.string().c_str(), "r");
+ BOOST_REQUIRE(f);
+ sub::SCCReader reader(f);
+ fclose(f);
+ auto subs = sub::collect<std::vector<sub::Subtitle>> (reader.subtitles());
+
+ for (auto sub: subs) {
+ std::cout << ">Time " << sub.from << " -> " << sub.to << "\n";
+ for (auto line: sub.lines) {
+ std::cout << ">Line " << *line.vertical_position.line << "\n";
for (auto block: line.blocks) {
std::cout << block.text << "\n";
}