Adapt for libdcp use of enum class.
[dcpomatic.git] / test / test.cc
index 19e8f978a481977ee51bb59c84252fe3c8bc9679..cbd12e1ee363cf7d6a592703db2d7984980d2193 100644 (file)
@@ -458,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";
        }
 }
@@ -790,3 +790,24 @@ 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, Standard t)
+{
+       switch (t) {
+       case Standard::INTEROP:
+               s << "interop";
+               break;
+       case Standard::SMPTE:
+               s << "smpte";
+               break;
+       }
+       return s;
+}
+