comparison data/model/test/TestFFTModel.h @ 1428:87ae75da6527

Convert some cerrs to SVCERRs. Apart from anything else, this makes MSVC2017 happy
author Chris Cannam
date Thu, 01 Mar 2018 14:43:40 +0000
parents 457a1a619c5f
children 48e9f538e6e9
comparison
equal deleted inserted replaced
1427:622d193a00dc 1428:87ae75da6527
64 float eRe = expectedValues[ch][i].real(); 64 float eRe = expectedValues[ch][i].real();
65 float eIm = expectedValues[ch][i].imag(); 65 float eIm = expectedValues[ch][i].imag();
66 float thresh = 1e-5f; 66 float thresh = 1e-5f;
67 if (abs(reals[i] - eRe) > thresh || 67 if (abs(reals[i] - eRe) > thresh ||
68 abs(imags[i] - eIm) > thresh) { 68 abs(imags[i] - eIm) > thresh) {
69 cerr << "ERROR: output is not as expected for column " 69 SVCERR << "ERROR: output is not as expected for column "
70 << i << " in channel " << ch << " (stepThrough = " 70 << i << " in channel " << ch << " (stepThrough = "
71 << stepThrough << ")" << endl; 71 << stepThrough << ")" << endl;
72 cerr << "expected : "; 72 SVCERR << "expected : ";
73 for (int j = 0; j < hs1; ++j) { 73 for (int j = 0; j < hs1; ++j) {
74 cerr << expectedValues[ch][j] << " "; 74 SVCERR << expectedValues[ch][j] << " ";
75 } 75 }
76 cerr << "\nactual : "; 76 SVCERR << "\nactual : ";
77 for (int j = 0; j < hs1; ++j) { 77 for (int j = 0; j < hs1; ++j) {
78 cerr << complex<float>(reals[j], imags[j]) << " "; 78 SVCERR << complex<float>(reals[j], imags[j]) << " ";
79 } 79 }
80 cerr << endl; 80 SVCERR << endl;
81 } 81 }
82 COMPARE_FUZZIER_F(reals[i], eRe); 82 COMPARE_FUZZIER_F(reals[i], eRe);
83 COMPARE_FUZZIER_F(imags[i], eIm); 83 COMPARE_FUZZIER_F(imags[i], eIm);
84 } 84 }
85 QCOMPARE(reals[hs1], 999.f); 85 QCOMPARE(reals[hs1], 999.f);