Fix test comparison of float.
authorCarl Hetherington <cth@carlh.net>
Thu, 1 May 2014 11:34:02 +0000 (12:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 1 May 2014 11:34:02 +0000 (12:34 +0100)
test/ffmpeg_pts_offset_test.cc

index 9a9785d281c26a69e4d4e5eba9184b4037b09649..83fe7c7089dd9568bf550b21a2ef0b5f7871a606 100644 (file)
@@ -75,6 +75,6 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
                content->_first_video = ContentTime::from_seconds (frame + 0.0215 + 4.1);
                content->_audio_stream->first_audio = ContentTime::from_seconds (4.1);
                FFmpegDecoder decoder (content, film->log());
-               BOOST_CHECK_EQUAL (decoder._pts_offset.seconds(), (frame - 0.0215) - 4.1);
+               BOOST_CHECK_CLOSE (decoder._pts_offset.seconds(), (frame - 0.0215) - 4.1, 0.1);
        }
 }