X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=test%2Fshuffler_test.cc;h=0187300569c0a84afb3ac019dc889b8dfc0d1d2d;hp=d1c5b85338f53272ead9d19e4388a9cea0dd12dc;hb=0303a96b66eaf85060ce02d85cc36067f34b1051;hpb=32294829b99fcbfa67e2b6b13b7a60d7244ff0ac diff --git a/test/shuffler_test.cc b/test/shuffler_test.cc index d1c5b8533..018730056 100644 --- a/test/shuffler_test.cc +++ b/test/shuffler_test.cc @@ -10,14 +10,15 @@ using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif +using namespace dcpomatic; static void -push (Shuffler& s, int frame, Eyes eyes) +push(Shuffler& s, int frame, Eyes eyes) { shared_ptr piece (new Piece (shared_ptr(), shared_ptr(), FrameRateChange(24, 24))); ContentVideo cv; - cv.frame = frame; + cv.time = ContentTime::from_frames(frame, 24); cv.eyes = eyes; s.video (piece, cv); } @@ -33,8 +34,9 @@ receive (weak_ptr, ContentVideo cv) static void check (int frame, Eyes eyes, int line) { + auto const time = ContentTime::from_frames(frame, 24); BOOST_REQUIRE_MESSAGE (!pending_cv.empty(), "Check at " << line << " failed."); - BOOST_CHECK_MESSAGE (pending_cv.front().frame == frame, "Check at " << line << " failed."); + BOOST_CHECK_MESSAGE (pending_cv.front().time == time, "Check at " << line << " failed."); BOOST_CHECK_MESSAGE (pending_cv.front().eyes == eyes, "Check at " << line << " failed."); pending_cv.pop_front(); }