summaryrefslogtreecommitdiff
path: root/test/smpte_subtitle_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-21 01:57:06 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-21 01:57:06 +0100
commit76e3325a16cdf6d7220a61e2b5cfdb9c804cc32c (patch)
tree8c1b5e5dc2cec265469a0d8018b6d7396b089432 /test/smpte_subtitle_test.cc
parent6c3db78c3d20ef064fa2a0ef38e65ca1ae69adb3 (diff)
Use enum class for the things in types.h
Diffstat (limited to 'test/smpte_subtitle_test.cc')
-rw-r--r--test/smpte_subtitle_test.cc43
1 files changed, 21 insertions, 22 deletions
diff --git a/test/smpte_subtitle_test.cc b/test/smpte_subtitle_test.cc
index 6f72511e..2af76696 100644
--- a/test/smpte_subtitle_test.cc
+++ b/test/smpte_subtitle_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -34,34 +34,33 @@
#include <boost/test/unit_test.hpp>
#include "smpte_subtitle_asset.h"
+using std::make_shared;
using std::string;
-using boost::optional;
using std::shared_ptr;
+using boost::optional;
BOOST_AUTO_TEST_CASE (smpte_subtitle_id_test)
{
dcp::SMPTESubtitleAsset subs;
subs.add(
- shared_ptr<dcp::Subtitle> (
- new dcp::SubtitleString(
- optional<string>(),
- false, false, false,
- dcp::Colour(),
- 64,
- 1,
- dcp::Time(0, 1, 2, 3, 24),
- dcp::Time(0, 2, 2, 3, 24),
- 0.5,
- dcp::HALIGN_CENTER,
- 0.5,
- dcp::VALIGN_CENTER,
- dcp::DIRECTION_LTR,
- "Hello",
- dcp::NONE,
- dcp::Colour(),
- dcp::Time(0, 0, 0, 0, 24),
- dcp::Time(0, 0, 0, 0, 24)
- )
+ make_shared<dcp::SubtitleString>(
+ optional<string>(),
+ false, false, false,
+ dcp::Colour(),
+ 64,
+ 1,
+ dcp::Time(0, 1, 2, 3, 24),
+ dcp::Time(0, 2, 2, 3, 24),
+ 0.5,
+ dcp::HAlign::CENTER,
+ 0.5,
+ dcp::VAlign::CENTER,
+ dcp::Direction::LTR,
+ "Hello",
+ dcp::Effect::NONE,
+ dcp::Colour(),
+ dcp::Time(0, 0, 0, 0, 24),
+ dcp::Time(0, 0, 0, 0, 24)
)
);
subs.write("build/test/smpte_subtitle_id_test.mxf");