<ContentVersion> is optional in Interop so we can't assume it's there.
[libdcp.git] / test / write_subtitle_test.cc
index 808df31b081fdf070691ee03ecb715a1e4b4fc4f..4bdc6e9d04995f027bfc6bc97c51536d3dd5eb6d 100644 (file)
@@ -46,6 +46,7 @@
 
 using std::list;
 using std::string;
+using boost::optional;
 using boost::shared_ptr;
 
 /** Test dcp::order::Font::take_intersection */
@@ -372,7 +373,10 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test3)
        cpl->set_creator (creator);
        cpl->set_issue_date (issue_date);
        cpl->set_annotation_text (annotation_text);
-       cpl->set_content_version_label_text ("foo");
+       optional<dcp::ContentVersion> cv = cpl->content_version();
+       BOOST_REQUIRE (cv);
+       cv->label_text = "foo";
+       cpl->set_content_version (*cv);
 
        dcp::DCP dcp ("build/test/write_interop_subtitle_test3");
        dcp.add (cpl);