Revision 4:d8724c5a6d83 vamp-plugin-tester.cpp
| vamp-plugin-tester.cpp | ||
|---|---|---|
| 86 | 86 |
bool good = true; |
| 87 | 87 |
Vamp::HostExt::PluginLoader::PluginKeyList keys = |
| 88 | 88 |
Vamp::HostExt::PluginLoader::getInstance()->listPlugins(); |
| 89 |
int notes = 0, warnings = 0, errors = 0; |
|
| 89 | 90 |
for (int i = 0; i < (int)keys.size(); ++i) {
|
| 90 | 91 |
cout << "Testing plugin: " << keys[i] << endl; |
| 91 | 92 |
Tester tester(keys[i]); |
| 92 |
if (tester.test()) {
|
|
| 93 |
if (tester.test(notes, warnings, errors)) {
|
|
| 93 | 94 |
cout << name << ": All tests succeeded for this plugin" << endl; |
| 94 | 95 |
} else {
|
| 95 | 96 |
cout << name << ": Some tests failed for this plugin" << endl; |
| ... | ... | |
| 98 | 99 |
cout << endl; |
| 99 | 100 |
} |
| 100 | 101 |
if (good) {
|
| 101 |
cout << name << ": All tests succeeded" << endl; |
|
| 102 |
cout << name << ": All tests succeeded"; |
|
| 103 |
if (warnings > 0) {
|
|
| 104 |
cout << ", with " << warnings << " warning(s)"; |
|
| 105 |
if (notes > 0) {
|
|
| 106 |
cout << " and " << notes << " other note(s)"; |
|
| 107 |
} |
|
| 108 |
} else if (notes > 0) {
|
|
| 109 |
cout << ", with " << notes << " note(s)"; |
|
| 110 |
} |
|
| 111 |
cout << endl; |
|
| 102 | 112 |
return 0; |
| 103 | 113 |
} else {
|
| 104 | 114 |
cout << name << ": Some tests failed" << endl; |
| ... | ... | |
| 107 | 117 |
} else {
|
| 108 | 118 |
string key = argv[1]; |
| 109 | 119 |
Tester tester(key); |
| 110 |
if (tester.test()) {
|
|
| 111 |
cout << name << ": All tests succeeded" << endl; |
|
| 120 |
int notes = 0, warnings = 0, errors = 0; |
|
| 121 |
if (tester.test(notes, warnings, errors)) {
|
|
| 122 |
cout << name << ": All tests succeeded"; |
|
| 123 |
if (warnings > 0) {
|
|
| 124 |
cout << ", with " << warnings << " warning(s)"; |
|
| 125 |
if (notes > 0) {
|
|
| 126 |
cout << " and " << notes << " other note(s)"; |
|
| 127 |
} |
|
| 128 |
} else if (notes > 0) {
|
|
| 129 |
cout << ", with " << notes << " note(s)"; |
|
| 130 |
} |
|
| 131 |
cout << endl; |
|
| 112 | 132 |
return 0; |
| 113 | 133 |
} else {
|
| 114 | 134 |
cout << name << ": Some tests failed" << endl; |
Also available in: Unified diff