diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-27 20:20:23 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-27 20:20:23 +0200 |
| commit | 018bb01d2190cb57ded144fcb3944c3312abbbba (patch) | |
| tree | 2377315ed16c56d99e612d6dec8b9e6e7df26c94 /test | |
| parent | 627dfd9a5cdcce9e4122ef3041a38c3da2d3a120 (diff) | |
<ContentVersion> is optional in Interop so we can't assume it's there.
Diffstat (limited to 'test')
| -rw-r--r-- | test/write_subtitle_test.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/write_subtitle_test.cc b/test/write_subtitle_test.cc index b7d8119a..4bdc6e9d 100644 --- a/test/write_subtitle_test.cc +++ b/test/write_subtitle_test.cc @@ -46,6 +46,7 @@ using std::list; using std::string; +using boost::optional; using boost::shared_ptr; /** Test dcp::order::Font::take_intersection */ @@ -372,9 +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); - dcp::ContentVersion cv = cpl->content_version(); - cv.label_text = "foo"; - cpl->set_content_version (cv); + 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); |
