Mercurial > hg > vamp-plugin-tester
comparison TestStaticData.cpp @ 35:b700f37dc118
Add test for .cat file
author | Chris Cannam |
---|---|
date | Tue, 10 Jun 2014 08:50:54 +0100 |
parents | ea8865f488a0 |
children | 07144cdcbedf |
comparison
equal
deleted
inserted
replaced
34:a2d9aed55a2a | 35:b700f37dc118 |
---|---|
38 */ | 38 */ |
39 | 39 |
40 #include "TestStaticData.h" | 40 #include "TestStaticData.h" |
41 | 41 |
42 #include <vamp-hostsdk/Plugin.h> | 42 #include <vamp-hostsdk/Plugin.h> |
43 #include <vamp-hostsdk/PluginLoader.h> | |
43 using namespace Vamp; | 44 using namespace Vamp; |
45 using namespace Vamp::HostExt; | |
44 | 46 |
45 #include <memory> | 47 #include <memory> |
46 using namespace std; | 48 using namespace std; |
47 | 49 |
48 #include <cmath> | 50 #include <cmath> |
53 Tester::TestRegistrar<TestEmptyFields> | 55 Tester::TestRegistrar<TestEmptyFields> |
54 TestEmptyFields::m_registrar("A2 Empty metadata fields"); | 56 TestEmptyFields::m_registrar("A2 Empty metadata fields"); |
55 | 57 |
56 Tester::TestRegistrar<TestValueRanges> | 58 Tester::TestRegistrar<TestValueRanges> |
57 TestValueRanges::m_registrar("A3 Inappropriate value extents"); | 59 TestValueRanges::m_registrar("A3 Inappropriate value extents"); |
60 | |
61 Tester::TestRegistrar<TestCategory> | |
62 TestCategory::m_registrar("A3 Missing category"); | |
58 | 63 |
59 Test::Results | 64 Test::Results |
60 TestIdentifiers::test(string key, Options) | 65 TestIdentifiers::test(string key, Options) |
61 { | 66 { |
62 auto_ptr<Plugin> p(load(key)); | 67 auto_ptr<Plugin> p(load(key)); |
196 } | 201 } |
197 | 202 |
198 return r; | 203 return r; |
199 } | 204 } |
200 | 205 |
201 | 206 Test::Results |
207 TestCategory::test(string key, Options) | |
208 { | |
209 PluginLoader::PluginCategoryHierarchy hierarchy = | |
210 PluginLoader::getInstance()->getPluginCategory(key); | |
211 | |
212 Results r; | |
213 | |
214 if (hierarchy.empty()) { | |
215 r.push_back(warning("Plugin category missing or cannot be loaded (no .cat file?)")); | |
216 } | |
217 | |
218 return r; | |
219 } | |
220 |