More informative failures.
authorCarl Hetherington <cth@carlh.net>
Tue, 14 Jul 2015 23:13:22 +0000 (00:13 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 14 Jul 2015 23:13:22 +0000 (00:13 +0100)
test/test.cc

index 1080aec793f4ecd1b5f4efa9f9d5ccb33297e1e7..b86796bbd1b6bd7ad19862eb1bc5d920c769f90b 100644 (file)
@@ -144,7 +144,10 @@ check_audio_file (boost::filesystem::path ref, boost::filesystem::path check)
                BOOST_CHECK_EQUAL (r, this_time);
 
                for (sf_count_t i = 0; i < this_time; ++i) {
-                       BOOST_REQUIRE (abs (ref_buffer[i] - check_buffer[i]) <= 65536);
+                       BOOST_REQUIRE_MESSAGE (
+                               abs (ref_buffer[i] - check_buffer[i]) <= 65536,
+                               ref << " differs from " << check << " at " << (ref_info.frames - N + i) << " of " << ref_info.frames
+                               );
                }
 
                N -= this_time;