Ref does not need to be a template since it's always used for Asset.
[libdcp.git] / test / write_subtitle_test.cc
index b5daa2b1774f1befd8d02f9d3fdff7c0cf7a460f..8b50b0e3f0660fa7494ce8625956043a53aaf709 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-#include "interop_subtitle_content.h"
+#include "interop_subtitle_asset.h"
 #include "subtitle_string.h"
 #include "test.h"
 #include <boost/test/unit_test.hpp>
@@ -29,7 +29,10 @@ using boost::shared_ptr;
 /* Write some subtitle content as Interop XML and check that it is right */
 BOOST_AUTO_TEST_CASE (write_subtitle_test)
 {
-       dcp::InteropSubtitleContent c ("Test", "EN");
+       dcp::InteropSubtitleAsset c;
+       c.set_reel_number ("1");
+       c.set_language ("EN");
+       c.set_movie_title ("Test");
 
        c.add (
                dcp::SubtitleString (
@@ -37,10 +40,13 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test)
                        false,
                        dcp::Colour (255, 255, 255),
                        48,
+                       1.0,
                        dcp::Time (0, 4,  9, 22, 24),
                        dcp::Time (0, 4, 11, 22, 24),
+                       0,
+                       dcp::HALIGN_CENTER,
                        0.8,
-                       dcp::TOP,
+                       dcp::VALIGN_TOP,
                        "Hello world",
                        dcp::NONE,
                        dcp::Colour (0, 0, 0),
@@ -55,10 +61,13 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test)
                        true,
                        dcp::Colour (128, 0, 64),
                        91,
+                       1.0,
                        dcp::Time (5, 41,  0, 21, 24),
                        dcp::Time (6, 12, 15, 21, 24),
+                       0,
+                       dcp::HALIGN_CENTER,
                        0.4,
-                       dcp::BOTTOM,
+                       dcp::VALIGN_BOTTOM,
                        "What's going on",
                        dcp::BORDER,
                        dcp::Colour (1, 2, 3),
@@ -66,7 +75,7 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test)
                        dcp::Time (5, 6, 7, 8, 24)
                        )
                );
-       
+
        c._id = "a6c58cff-3e1e-4b38-acec-a42224475ef6";
 
        check_xml (
@@ -77,12 +86,12 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test)
                "  <ReelNumber>1</ReelNumber>\n"
                "  <Language>EN</Language>\n"
                "  <Font Id=\"Frutiger\" Italic=\"no\" Color=\"FFFFFFFF\" Size=\"48\" Effect=\"none\" EffectColor=\"FF000000\" Script=\"normal\" Underlined=\"no\" Weight=\"normal\">\n"
-               "    <Subtitle SpotNumber=\"1\" TimeIn=\"00:04:09:022\" TimeOut=\"00:04:11:022\" FadeUpTime=\"0\" FadeDownTime=\"0\">\n"
+               "    <Subtitle SpotNumber=\"1\" TimeIn=\"00:04:09:229\" TimeOut=\"00:04:11:229\" FadeUpTime=\"0\" FadeDownTime=\"0\">\n"
                "      <Text VAlign=\"top\" VPosition=\"80\">Hello world</Text>\n"
                "    </Subtitle>\n"
                "  </Font>\n"
                "  <Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underlined=\"no\" Weight=\"normal\">\n"
-               "    <Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:021\" TimeOut=\"06:12:15:021\" FadeUpTime=\"930790\" FadeDownTime=\"4591830\">\n"
+               "    <Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:218\" TimeOut=\"06:12:15:218\" FadeUpTime=\"930792\" FadeDownTime=\"4591834\">\n"
                "      <Text VAlign=\"bottom\" VPosition=\"40\">What's going on</Text>\n"
                "    </Subtitle>\n"
                "  </Font>\n"
@@ -90,4 +99,3 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test)
                list<string> ()
                );
 }
-