diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-09 13:13:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-17 20:13:22 +0100 |
| commit | 8edf0af514e285454a15f14561519608e6d6aad9 (patch) | |
| tree | fd2c6727c2c26a6f3c8279ef4a194296ffb778dc /test/test.cc | |
| parent | 0b39df958f534068950669a763be7b4602740107 (diff) | |
Bv2.1 6.2.1: Check that the sound MXF Language tag conforms to RFC 5646.
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test.cc b/test/test.cc index c24f28cd..c8f41d05 100644 --- a/test/test.cc +++ b/test/test.cc @@ -271,9 +271,11 @@ simple_picture (boost::filesystem::path path, string suffix) shared_ptr<dcp::SoundAsset> -simple_sound (boost::filesystem::path path, string suffix, dcp::MXFMetadata mxf_meta) +simple_sound (boost::filesystem::path path, string suffix, dcp::MXFMetadata mxf_meta, string language) { + /* Set a valid language, then overwrite it, so that the language parameter can be badly formed */ shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset(dcp::Fraction(24, 1), 48000, 1, dcp::LanguageTag("en-US"), dcp::SMPTE)); + ms->_language = language; ms->set_metadata (mxf_meta); vector<dcp::Channel> active_channels; active_channels.push_back (dcp::LEFT); @@ -325,7 +327,7 @@ make_simple (boost::filesystem::path path, int reels) string suffix = reels == 1 ? "" : dcp::String::compose("%1", i); shared_ptr<dcp::MonoPictureAsset> mp = simple_picture (path, suffix); - shared_ptr<dcp::SoundAsset> ms = simple_sound (path, suffix, mxf_meta); + shared_ptr<dcp::SoundAsset> ms = simple_sound (path, suffix, mxf_meta, "en-US"); cpl->add (shared_ptr<dcp::Reel> ( new dcp::Reel ( |
