comparison base/test/TestColumnOp.h @ 1269:f50c0bbe9096 3.0-integration

Don't show this log by default
author Chris Cannam
date Fri, 18 Nov 2016 23:30:15 +0000
parents 1d8418cca63a
children 7cff8367d9b1
comparison
equal deleted inserted replaced
1268:b7b84ae5f0a7 1269:f50c0bbe9096
31 31
32 typedef ColumnOp C; 32 typedef ColumnOp C;
33 typedef ColumnOp::Column Column; 33 typedef ColumnOp::Column Column;
34 typedef vector<double> BinMapping; 34 typedef vector<double> BinMapping;
35 35
36 #ifdef REPORT
36 template <typename T> 37 template <typename T>
37 void report(vector<T> v) { 38 void report(vector<T> v) {
38 cerr << "Vector is: [ "; 39 cerr << "Vector is: [ ";
39 for (int i = 0; i < int(v.size()); ++i) { 40 for (int i = 0; i < int(v.size()); ++i) {
40 if (i > 0) cerr << ", "; 41 if (i > 0) cerr << ", ";
41 cerr << v[i]; 42 cerr << v[i];
42 } 43 }
43 cerr << " ]\n"; 44 cerr << " ]\n";
44 } 45 }
46 #else
47 template <typename T>
48 void report(vector<T> ) { }
49 #endif
45 50
46 private slots: 51 private slots:
47 void applyGain() { 52 void applyGain() {
48 QCOMPARE(C::applyGain({}, 1.0), Column()); 53 QCOMPARE(C::applyGain({}, 1.0), Column());
49 Column c { 1, 2, 3, -4, 5, 6 }; 54 Column c { 1, 2, 3, -4, 5, 6 };