More enum class additions.
[dcpomatic.git] / test / test.cc
index 9ac202b8051c11a305c058fcbc8dd417b7162414..b82af3e2f4570782ccffbde6ef88e8f575642041 100644 (file)
@@ -68,9 +68,9 @@ using std::cout;
 using std::cerr;
 using std::list;
 using std::abs;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::scoped_array;
-using boost::dynamic_pointer_cast;
+using std::dynamic_pointer_cast;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
@@ -108,7 +108,10 @@ setup_test_config ()
        Config::instance()->set_default_interop (false);
        Config::instance()->set_default_still_length (10);
        Config::instance()->set_log_types (
-               LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING | LogEntry::TYPE_ERROR | LogEntry::TYPE_DEBUG_THREED | LogEntry::TYPE_DEBUG_ENCODE | LogEntry::TYPE_DEBUG_PLAYER
+               LogEntry::TYPE_GENERAL | LogEntry::TYPE_WARNING |
+               LogEntry::TYPE_ERROR | LogEntry::TYPE_DEBUG_THREE_D |
+               LogEntry::TYPE_DEBUG_ENCODE | LogEntry::TYPE_DEBUG_PLAYER |
+               LogEntry::TYPE_DISK
                );
        Config::instance()->set_automatic_audio_analysis (false);
 }
@@ -336,9 +339,9 @@ static
 double
 rms_error (boost::filesystem::path ref, boost::filesystem::path check)
 {
-       FFmpegImageProxy ref_proxy (ref);
+       FFmpegImageProxy ref_proxy (ref, VideoRange::FULL);
        shared_ptr<Image> ref_image = ref_proxy.image().image;
-       FFmpegImageProxy check_proxy (check);
+       FFmpegImageProxy check_proxy (check, VideoRange::FULL);
        shared_ptr<Image> check_image = check_proxy.image().image;
 
        BOOST_REQUIRE_EQUAL (ref_image->pixel_format(), check_image->pixel_format());
@@ -455,7 +458,7 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
 static void
 note (dcp::NoteType t, string n)
 {
-       if (t == dcp::DCP_ERROR) {
+       if (t == dcp::NoteType::ERROR) {
                cerr << n << "\n";
        }
 }
@@ -787,3 +790,31 @@ LogSwitcher::~LogSwitcher ()
        dcpomatic_log = _old;
 }
 
+std::ostream&
+dcp::operator<< (std::ostream& s, dcp::Size i)
+{
+       s << i.width << "x" << i.height;
+       return s;
+}
+
+std::ostream&
+dcp::operator<< (std::ostream& s, dcp::Standard t)
+{
+       switch (t) {
+       case Standard::INTEROP:
+               s << "interop";
+               break;
+       case Standard::SMPTE:
+               s << "smpte";
+               break;
+       }
+       return s;
+}
+
+std::ostream&
+operator<< (std::ostream&s, VideoFrameType f)
+{
+       s << video_frame_type_to_string(f);
+       return s;
+}
+