summaryrefslogtreecommitdiff
path: root/test/ssa_reader_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-11 23:32:05 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-11 23:32:05 +0100
commit3e299e5610b5e5929769a9ced21f8b45f8820d81 (patch)
tree306449fa7c922d560f4ea7751c4eb635c6a68e26 /test/ssa_reader_test.cc
parentf7769c330bed741d39c713c206b2445b8feddfd1 (diff)
Support an commands in SSA.
Diffstat (limited to 'test/ssa_reader_test.cc')
-rw-r--r--test/ssa_reader_test.cc47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/ssa_reader_test.cc b/test/ssa_reader_test.cc
index 1aa7b7a..46b5cb7 100644
--- a/test/ssa_reader_test.cc
+++ b/test/ssa_reader_test.cc
@@ -193,5 +193,52 @@ BOOST_AUTO_TEST_CASE (ssa_reader_test3)
BLOCK(" are here.", "Arial", 20, false, false, false);
SUB_END();
+ /* Alignments */
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 230), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::BOTTOM_OF_SCREEN);
+ BLOCK("bottom left", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 240), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::BOTTOM_OF_SCREEN);
+ BLOCK("bottom centre", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 250), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::BOTTOM_OF_SCREEN);
+ BLOCK("bottom right", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 260), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::CENTRE_OF_SCREEN);
+ BLOCK("middle left", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 270), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::CENTRE_OF_SCREEN);
+ BLOCK("middle centre", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 280), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::CENTRE_OF_SCREEN);
+ BLOCK("middle right", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 290), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::TOP_OF_SCREEN);
+ BLOCK("top left", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 300), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::TOP_OF_SCREEN);
+ BLOCK("top centre", "Arial", 20, false, false, false);
+ SUB_END ();
+
+ SUB_START (sub::Time::from_hms (0, 0, 9, 310), sub::Time::from_hms (0, 0, 11, 560));
+ LINE (0, sub::TOP_OF_SCREEN);
+ BLOCK("top right", "Arial", 20, false, false, false);
+ SUB_END ();
+
BOOST_REQUIRE (i == subs.end ());
}