projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecef89d
)
Fix audio analysis test after change to XML.
author
Carl Hetherington
<cth@carlh.net>
Thu, 14 May 2015 08:09:02 +0000
(09:09 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 14 May 2015 08:09:02 +0000
(09:09 +0100)
test/audio_analysis_test.cc
patch
|
blob
|
history
diff --git
a/test/audio_analysis_test.cc
b/test/audio_analysis_test.cc
index 2799449191575571a55e3c2694a9032265608fee..dda7db544f3f23751f341c9d61ba516f7f07481d 100644
(file)
--- a/
test/audio_analysis_test.cc
+++ b/
test/audio_analysis_test.cc
@@
-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