summaryrefslogtreecommitdiff
path: root/test/text_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-15 09:30:31 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-15 09:30:31 +0000
commit19e00ec24925192d354dd15961b9f067c790edbf (patch)
tree6c9be817f14f27799af2af61f95f686df3e89b53 /test/text_test.cc
parent8951dd59e685b112e28a0d72edcabd4524e0289d (diff)
Fix code and tests so that SubtitleString::v_position is between 0 and 1 (not a percentage) as the comment says it should be.
Diffstat (limited to 'test/text_test.cc')
-rw-r--r--test/text_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/text_test.cc b/test/text_test.cc
index b8d76207..6749a753 100644
--- a/test/text_test.cc
+++ b/test/text_test.cc
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE (text_test1)
text->add_child_text("Hello world");
dcp::Text t (cxml::NodePtr (new cxml::Node (text)), 250);
- BOOST_CHECK_CLOSE (t.v_position, 4.2, 0.001);
+ BOOST_CHECK_CLOSE (t.v_position, 0.042, 0.001);
BOOST_CHECK_EQUAL (t.v_align, dcp::TOP);
BOOST_CHECK_EQUAL (t.text, "Hello world");
}
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (text_test2)
text->add_child_text("Hello world");
dcp::Text t (cxml::NodePtr (new cxml::Node (text)), 250);
- BOOST_CHECK_CLOSE (t.v_position, 4.2, 0.001);
+ BOOST_CHECK_CLOSE (t.v_position, 0.042, 0.001);
BOOST_CHECK_EQUAL (t.v_align, dcp::TOP);
BOOST_CHECK_EQUAL (t.text, "Hello world");
}