cannam@1
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
cannam@1
|
2
|
cannam@1
|
3 /*
|
cannam@1
|
4 Vamp Plugin Tester
|
cannam@1
|
5 Chris Cannam, cannam@all-day-breakfast.com
|
cannam@1
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@42
|
7 Copyright 2009-2014 QMUL.
|
cannam@1
|
8
|
cannam@1
|
9 This program loads a Vamp plugin and tests its susceptibility to a
|
cannam@1
|
10 number of common pitfalls, including handling of extremes of input
|
cannam@1
|
11 data. If you can think of any additional useful tests that are
|
cannam@1
|
12 easily added, please send them to me.
|
cannam@1
|
13
|
cannam@1
|
14 Permission is hereby granted, free of charge, to any person
|
cannam@1
|
15 obtaining a copy of this software and associated documentation
|
cannam@1
|
16 files (the "Software"), to deal in the Software without
|
cannam@1
|
17 restriction, including without limitation the rights to use, copy,
|
cannam@1
|
18 modify, merge, publish, distribute, sublicense, and/or sell copies
|
cannam@1
|
19 of the Software, and to permit persons to whom the Software is
|
cannam@1
|
20 furnished to do so, subject to the following conditions:
|
cannam@1
|
21
|
cannam@1
|
22 The above copyright notice and this permission notice shall be
|
cannam@1
|
23 included in all copies or substantial portions of the Software.
|
cannam@1
|
24
|
cannam@1
|
25 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
cannam@1
|
26 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
cannam@1
|
27 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
cannam@1
|
28 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
|
cannam@1
|
29 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
cannam@1
|
30 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
cannam@1
|
31 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
cannam@1
|
32
|
cannam@1
|
33 Except as contained in this notice, the names of the Centre for
|
cannam@1
|
34 Digital Music; Queen Mary, University of London; and Chris Cannam
|
cannam@1
|
35 shall not be used in advertising or otherwise to promote the sale,
|
cannam@1
|
36 use or other dealings in this Software without prior written
|
cannam@1
|
37 authorization.
|
cannam@1
|
38 */
|
cannam@1
|
39
|
cannam@1
|
40 #ifndef _TEST_INPUT_EXTREMES_H_
|
cannam@1
|
41 #define _TEST_INPUT_EXTREMES_H_
|
cannam@1
|
42
|
cannam@1
|
43 #include "Test.h"
|
cannam@1
|
44 #include "Tester.h"
|
cannam@1
|
45
|
cannam@1
|
46 #include <string>
|
cannam@1
|
47
|
cannam@1
|
48 #include <vamp-hostsdk/Plugin.h>
|
cannam@1
|
49
|
cannam@1
|
50 class TestNormalInput : public Test
|
cannam@1
|
51 {
|
cannam@1
|
52 public:
|
cannam@1
|
53 TestNormalInput() : Test() { }
|
cannam@8
|
54 Results test(std::string key, Options options);
|
cannam@1
|
55
|
cannam@1
|
56 protected:
|
cannam@1
|
57 static Tester::TestRegistrar<TestNormalInput> m_registrar;
|
cannam@1
|
58 };
|
cannam@1
|
59
|
cannam@1
|
60 class TestNoInput : public Test
|
cannam@1
|
61 {
|
cannam@1
|
62 public:
|
cannam@1
|
63 TestNoInput() : Test() { }
|
cannam@8
|
64 Results test(std::string key, Options options);
|
cannam@1
|
65
|
cannam@1
|
66 protected:
|
cannam@1
|
67 static Tester::TestRegistrar<TestNoInput> m_registrar;
|
cannam@1
|
68 };
|
cannam@1
|
69
|
cannam@1
|
70 class TestShortInput : public Test
|
cannam@1
|
71 {
|
cannam@1
|
72 public:
|
cannam@1
|
73 TestShortInput() : Test() { }
|
cannam@8
|
74 Results test(std::string key, Options options);
|
cannam@1
|
75
|
cannam@1
|
76 protected:
|
cannam@1
|
77 static Tester::TestRegistrar<TestShortInput> m_registrar;
|
cannam@1
|
78 };
|
cannam@1
|
79
|
cannam@1
|
80 class TestSilentInput : public Test
|
cannam@1
|
81 {
|
cannam@1
|
82 public:
|
cannam@1
|
83 TestSilentInput() : Test() { }
|
cannam@8
|
84 Results test(std::string key, Options options);
|
cannam@1
|
85
|
cannam@1
|
86 protected:
|
cannam@1
|
87 static Tester::TestRegistrar<TestSilentInput> m_registrar;
|
cannam@1
|
88 };
|
cannam@1
|
89
|
cannam@1
|
90 class TestTooLoudInput : public Test
|
cannam@1
|
91 {
|
cannam@1
|
92 public:
|
cannam@1
|
93 TestTooLoudInput() : Test() { }
|
cannam@8
|
94 Results test(std::string key, Options options);
|
cannam@1
|
95
|
cannam@1
|
96 protected:
|
cannam@1
|
97 static Tester::TestRegistrar<TestTooLoudInput> m_registrar;
|
cannam@1
|
98 };
|
cannam@1
|
99
|
cannam@1
|
100 class TestRandomInput : public Test
|
cannam@1
|
101 {
|
cannam@1
|
102 public:
|
cannam@1
|
103 TestRandomInput() : Test() { }
|
cannam@8
|
104 Results test(std::string key, Options options);
|
cannam@1
|
105
|
cannam@1
|
106 protected:
|
cannam@1
|
107 static Tester::TestRegistrar<TestRandomInput> m_registrar;
|
cannam@1
|
108 };
|
cannam@1
|
109
|
cannam@1
|
110
|
cannam@1
|
111 #endif
|
cannam@1
|
112
|