Fix audio analysis test after change to XML.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 May 2015 08:09:02 +0000 (09:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 14 May 2015 08:09:02 +0000 (09:09 +0100)
test/audio_analysis_test.cc

index 2799449191575571a55e3c2694a9032265608fee..dda7db544f3f23751f341c9d61ba516f7f07481d 100644 (file)
@@ -54,6 +54,10 @@ BOOST_AUTO_TEST_CASE (audio_analysis_serialisation_test)
                }
        }
 
+       float const peak = random_float ();
+       DCPTime const peak_time = DCPTime (rand ());
+       a.set_peak (peak, peak_time);
+
        a.write ("build/test/audio_analysis_serialisation_test");
 
        srand (1);
@@ -67,6 +71,11 @@ BOOST_AUTO_TEST_CASE (audio_analysis_serialisation_test)
                        BOOST_CHECK_CLOSE (p[AudioPoint::RMS],  random_float (), 1);
                }
        }
+       
+       BOOST_CHECK (b.peak ());
+       BOOST_CHECK_CLOSE (b.peak().get(), peak, 1);
+       BOOST_CHECK (b.peak_time ());
+       BOOST_CHECK_EQUAL (b.peak_time().get(), peak_time);
 }
 
 void