Mercurial > hg > vamp-plugin-tester
comparison vamp-plugin-tester.cpp @ 3:0f65bb22172b
* Add basic tests for output numbers, data existence, timestamps &c
author | cannam |
---|---|
date | Tue, 17 Mar 2009 16:38:47 +0000 |
parents | f89128a316e7 |
children | d8724c5a6d83 |
comparison
equal
deleted
inserted
replaced
2:c9a4bd247497 | 3:0f65bb22172b |
---|---|
85 if (argc == 1) { | 85 if (argc == 1) { |
86 bool good = true; | 86 bool good = true; |
87 Vamp::HostExt::PluginLoader::PluginKeyList keys = | 87 Vamp::HostExt::PluginLoader::PluginKeyList keys = |
88 Vamp::HostExt::PluginLoader::getInstance()->listPlugins(); | 88 Vamp::HostExt::PluginLoader::getInstance()->listPlugins(); |
89 for (int i = 0; i < (int)keys.size(); ++i) { | 89 for (int i = 0; i < (int)keys.size(); ++i) { |
90 cerr << "Testing plugin: " << keys[i] << endl; | 90 cout << "Testing plugin: " << keys[i] << endl; |
91 Tester tester(keys[i]); | 91 Tester tester(keys[i]); |
92 if (tester.test()) { | 92 if (tester.test()) { |
93 cerr << name << ": All tests succeeded for this plugin" << endl; | 93 cout << name << ": All tests succeeded for this plugin" << endl; |
94 } else { | 94 } else { |
95 cerr << name << ": Some tests failed for this plugin" << endl; | 95 cout << name << ": Some tests failed for this plugin" << endl; |
96 good = false; | 96 good = false; |
97 } | 97 } |
98 cerr << endl; | 98 cout << endl; |
99 } | 99 } |
100 if (good) { | 100 if (good) { |
101 cerr << name << ": All tests succeeded" << endl; | 101 cout << name << ": All tests succeeded" << endl; |
102 return 0; | 102 return 0; |
103 } else { | 103 } else { |
104 cerr << name << ": Some tests failed" << endl; | 104 cout << name << ": Some tests failed" << endl; |
105 return 1; | 105 return 1; |
106 } | 106 } |
107 } else { | 107 } else { |
108 string key = argv[1]; | 108 string key = argv[1]; |
109 Tester tester(key); | 109 Tester tester(key); |
110 if (tester.test()) { | 110 if (tester.test()) { |
111 cerr << name << ": All tests succeeded" << endl; | 111 cout << name << ": All tests succeeded" << endl; |
112 return 0; | 112 return 0; |
113 } else { | 113 } else { |
114 cerr << name << ": Some tests failed" << endl; | 114 cout << name << ": Some tests failed" << endl; |
115 return 1; | 115 return 1; |
116 } | 116 } |
117 } | 117 } |
118 } | 118 } |
119 | 119 |