projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Display the rating agency name rather than the URL (if we have it).
[dcpomatic.git]
/
test
/
isdcf_name_test.cc
diff --git
a/test/isdcf_name_test.cc
b/test/isdcf_name_test.cc
index 28df9b2b933a6a9fc49274469b8b69da92b382ab..4d17f704c4507bbe0cfeddeade2b339f4151aee4 100644
(file)
--- a/
test/isdcf_name_test.cc
+++ b/
test/isdcf_name_test.cc
@@
-25,22
+25,20
@@
*/
*/
-#include <boost/test/unit_test.hpp>
-#include "lib/film.h"
-#include "lib/ratio.h"
-#include "lib/dcp_content_type.h"
-#include "lib/image_content.h"
-#include "lib/video_content.h"
-#include "lib/audio_mapping.h"
-#include "lib/ffmpeg_content.h"
#include "lib/audio_content.h"
#include "lib/audio_content.h"
+#include "lib/audio_mapping.h"
#include "lib/content_factory.h"
#include "lib/content_factory.h"
+#include "lib/dcp_content_type.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/film.h"
+#include "lib/image_content.h"
+#include "lib/ratio.h"
#include "lib/text_content.h"
#include "lib/text_content.h"
+#include "lib/video_content.h"
#include "test.h"
#include "test.h"
-#include <
iostream
>
+#include <
boost/test/unit_test.hpp
>
-using std::cout;
using std::make_shared;
using std::shared_ptr;
using std::string;
using std::make_shared;
using std::shared_ptr;
using std::string;
@@
-56,7
+54,7
@@
BOOST_AUTO_TEST_CASE (isdcf_name_test)
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_container (Ratio::from_id ("185"));
film->_isdcf_date = boost::gregorian::date (2014, boost::gregorian::Jul, 4);
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_container (Ratio::from_id ("185"));
film->_isdcf_date = boost::gregorian::date (2014, boost::gregorian::Jul, 4);
- auto audio = content_factory("test/data/sine_440.wav")
.front()
;
+ auto audio = content_factory("test/data/sine_440.wav")
[0]
;
film->examine_and_add_content (audio);
BOOST_REQUIRE (!wait_for_jobs());
film->set_audio_language(dcp::LanguageTag("en-US"));
film->examine_and_add_content (audio);
BOOST_REQUIRE (!wait_for_jobs());
film->set_audio_language(dcp::LanguageTag("en-US"));
@@
-80,7
+78,7
@@
BOOST_AUTO_TEST_CASE (isdcf_name_test)
film->_isdcf_date = boost::gregorian::date (2014, boost::gregorian::Jul, 4);
film->set_audio_channels (1);
film->set_resolution (Resolution::FOUR_K);
film->_isdcf_date = boost::gregorian::date (2014, boost::gregorian::Jul, 4);
film->set_audio_channels (1);
film->set_resolution (Resolution::FOUR_K);
- auto text = content_factory("test/data/subrip.srt")
.front()
;
+ auto text = content_factory("test/data/subrip.srt")
[0]
;
BOOST_REQUIRE_EQUAL (text->text.size(), 1U);
text->text.front()->set_burn (true);
text->text.front()->set_language (dcp::LanguageTag("fr-FR"));
BOOST_REQUIRE_EQUAL (text->text.size(), 1U);
text->text.front()->set_burn (true);
text->text.front()->set_language (dcp::LanguageTag("fr-FR"));
@@
-91,7
+89,7
@@
BOOST_AUTO_TEST_CASE (isdcf_name_test)
film->set_studio (string("di"));
film->set_facility (string("ppfacility"));
BOOST_REQUIRE (!wait_for_jobs());
film->set_studio (string("di"));
film->set_facility (string("ppfacility"));
BOOST_REQUIRE (!wait_for_jobs());
- audio = content_factory("test/data/sine_440.wav")
.front()
;
+ audio = content_factory("test/data/sine_440.wav")
[0]
;
film->examine_and_add_content (audio);
BOOST_REQUIRE (!wait_for_jobs());
film->set_audio_language (dcp::LanguageTag("de-DE"));
film->examine_and_add_content (audio);
BOOST_REQUIRE (!wait_for_jobs());
film->set_audio_language (dcp::LanguageTag("de-DE"));
@@
-230,5
+228,9
@@
BOOST_AUTO_TEST_CASE (isdcf_name_test)
mapping.set (0, dcp::Channel::VI, 1.0);
sound->audio->set_mapping (mapping);
BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_71-HI-VI_4K_DI_20140704_PPF_SMPTE_OV");
mapping.set (0, dcp::Channel::VI, 1.0);
sound->audio->set_mapping (mapping);
BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_71-HI-VI_4K_DI_20140704_PPF_SMPTE_OV");
+
+ /* Check that the proper codes are used, not just part of the language code; in this case, QBP instead of PT (#2235) */
+ film->set_audio_language(dcp::LanguageTag("pt-BR"));
+ BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_QBP-fr_US-R_71-HI-VI_4K_DI_20140704_PPF_SMPTE_OV");
}
}