blob: 918b59ee9fc991438adcc2c429f23b4d04aa6607 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
#ifndef TEST_PARTIAL_TRACKING_H
#define TEST_PARTIAL_TRACKING_H
#include <cppunit/extensions/HelperMacros.h>
#include "../src/simpl/base.h"
#include "../src/simpl/peak_detection.h"
#include "../src/simpl/partial_tracking.h"
#include "test_common.h"
namespace simpl
{
// ---------------------------------------------------------------------------
// TestMQPartialTracking
// ---------------------------------------------------------------------------
class TestMQPartialTracking : public CPPUNIT_NS::TestCase {
CPPUNIT_TEST_SUITE(TestMQPartialTracking);
CPPUNIT_TEST(test_basic);
CPPUNIT_TEST(test_peaks);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
protected:
MQPeakDetection _pd;
MQPartialTracking _pt;
SndfileHandle _sf;
void test_basic();
void test_peaks();
};
// ---------------------------------------------------------------------------
// TestSMSPartialTracking
// ---------------------------------------------------------------------------
class TestSMSPartialTracking : public CPPUNIT_NS::TestCase {
CPPUNIT_TEST_SUITE(TestSMSPartialTracking);
CPPUNIT_TEST(test_basic);
CPPUNIT_TEST(test_basic_harm);
CPPUNIT_TEST(test_change_num_partials);
CPPUNIT_TEST(test_change_num_partials_harm);
CPPUNIT_TEST(test_peaks);
CPPUNIT_TEST(test_peaks_harm);
CPPUNIT_TEST(test_streaming);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
protected:
SMSPeakDetection _pd;
SMSPartialTracking _pt;
SMSPartialTracking _pt_harm;
SndfileHandle _sf;
void test_basic();
void test_basic_harm();
void test_change_num_partials();
void test_change_num_partials_harm();
void test_peaks();
void test_peaks_harm();
void test_streaming();
};
// ---------------------------------------------------------------------------
// TestSndObjPartialTracking
// ---------------------------------------------------------------------------
class TestSndObjPartialTracking : public CPPUNIT_NS::TestCase {
CPPUNIT_TEST_SUITE(TestSndObjPartialTracking);
CPPUNIT_TEST(test_basic);
CPPUNIT_TEST(test_change_num_partials);
CPPUNIT_TEST(test_peaks);
CPPUNIT_TEST(test_streaming);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
protected:
SndObjPeakDetection _pd;
SndObjPartialTracking _pt;
SndfileHandle _sf;
void test_basic();
void test_change_num_partials();
void test_peaks();
void test_streaming();
};
// ---------------------------------------------------------------------------
// TestLorisPartialTracking
// ---------------------------------------------------------------------------
class TestLorisPartialTracking : public CPPUNIT_NS::TestCase {
CPPUNIT_TEST_SUITE(TestLorisPartialTracking);
CPPUNIT_TEST(test_basic);
CPPUNIT_TEST(test_peaks);
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
protected:
LorisPeakDetection _pd;
LorisPartialTracking _pt;
SndfileHandle _sf;
void test_basic();
void test_peaks();
};
} // end of namespace simpl
#endif
|