Mercurial > hg > vamp-plugin-tester
diff Test.cpp @ 8:3019cb6b538d
* Add nondeterministic and verbose options to control output
* Dump returned features in a few more situations, if verbose is set
* Dump features to stdout rather than stderr
author | cannam |
---|---|
date | Wed, 18 Mar 2009 10:51:30 +0000 |
parents | 0f65bb22172b |
children | 5af5eb2627ad |
line wrap: on
line diff
--- a/Test.cpp Tue Mar 17 18:02:29 2009 +0000 +++ b/Test.cpp Wed Mar 18 10:51:30 2009 +0000 @@ -169,19 +169,19 @@ for (Plugin::FeatureSet::const_iterator fsi = fs.begin(); fsi != fs.end(); ++fsi) { int output = fsi->first; - std::cerr << "Output " << output << ":" << std::endl; + std::cout << "Output " << output << ":" << std::endl; const Plugin::FeatureList &fl = fsi->second; for (int i = 0; i < (int)fl.size(); ++i) { - std::cerr << " Feature " << i << ":" << std::endl; + std::cout << " Feature " << i << ":" << std::endl; const Plugin::Feature &f = fl[i]; - std::cerr << " Timestamp: " << (f.hasTimestamp ? "(none)" : f.timestamp.toText()) << std::endl; - std::cerr << " Duration: " << (f.hasDuration ? "(none)" : f.duration.toText()) << std::endl; - std::cerr << " Label: " << (f.label == "" ? "(none)" : f.label) << std::endl; - std::cerr << " Value: " << (f.values.empty() ? "(none)" : ""); + std::cout << " Timestamp: " << (f.hasTimestamp ? "(none)" : f.timestamp.toText()) << std::endl; + std::cout << " Duration: " << (f.hasDuration ? "(none)" : f.duration.toText()) << std::endl; + std::cout << " Label: " << (f.label == "" ? "(none)" : f.label) << std::endl; + std::cout << " Value: " << (f.values.empty() ? "(none)" : ""); for (int j = 0; j < (int)f.values.size(); ++j) { - std::cerr << f.values[j] << " "; + std::cout << f.values[j] << " "; } - std::cerr << std::endl; + std::cout << std::endl; } } } @@ -191,12 +191,12 @@ const Plugin::FeatureSet &a, const Plugin::FeatureSet &b) { - std::cerr << r.message() << std::endl; - std::cerr << "\nFirst result set:" << std::endl; + std::cout << r.message() << std::endl; + std::cout << "\nFirst result set:" << std::endl; dump(a); - std::cerr << "\nSecond result set:" << std::endl; + std::cout << "\nSecond result set:" << std::endl; dump(b); - std::cerr << std::endl; + std::cout << std::endl; } bool