From 364d1a9352cf1adcf08fbd4f0e793f24540d7402 Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 14 Jun 2013 11:47:06 +0200 Subject: Add basic SndObjPeakDetection tests. Fix memory leaks. --- tests/test_peak_detection.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests/test_peak_detection.h') diff --git a/tests/test_peak_detection.h b/tests/test_peak_detection.h index 2b574cb..a107ee8 100644 --- a/tests/test_peak_detection.h +++ b/tests/test_peak_detection.h @@ -73,6 +73,31 @@ protected: void test_find_peaks_change_hop_frame_size(); }; + +// --------------------------------------------------------------------------- +// TestSndObjPeakDetection +// --------------------------------------------------------------------------- +class TestSndObjPeakDetection : public CPPUNIT_NS::TestCase { + CPPUNIT_TEST_SUITE(TestSndObjPeakDetection); + CPPUNIT_TEST(test_find_peaks_in_frame_basic); + CPPUNIT_TEST(test_find_peaks_basic); + CPPUNIT_TEST(test_find_peaks_audio); + CPPUNIT_TEST(test_find_peaks_change_hop_frame_size); + CPPUNIT_TEST_SUITE_END(); + +public: + void setUp(); + +protected: + SndObjPeakDetection _pd; + SndfileHandle _sf; + + void test_find_peaks_in_frame_basic(); + void test_find_peaks_basic(); + void test_find_peaks_audio(); + void test_find_peaks_change_hop_frame_size(); +}; + } // end of namespace simpl #endif -- cgit v1.2.3