comparison data/model/test/TestFFTModel.h @ 1110:1517d4c60e88

Fix a number of warnings in the 32-bit build
author Chris Cannam
date Wed, 01 Jul 2015 15:53:54 +0100
parents 5fab8e4f5f19
children 457a1a619c5f
comparison
equal deleted inserted replaced
1088:5fab8e4f5f19 1110:1517d4c60e88
53 fftm.getValuesAt(columnNo, &reals[0], &imags[0]); 53 fftm.getValuesAt(columnNo, &reals[0], &imags[0]);
54 for (int i = 0; i < hs1; ++i) { 54 for (int i = 0; i < hs1; ++i) {
55 float eRe = expectedValues[ch][i].real(); 55 float eRe = expectedValues[ch][i].real();
56 float eIm = expectedValues[ch][i].imag(); 56 float eIm = expectedValues[ch][i].imag();
57 if (reals[i] != eRe || imags[i] != eIm) { 57 if (reals[i] != eRe || imags[i] != eIm) {
58 cerr << "ERROR: output is not as expected for column " 58 cerr << "NOTE: output is not as expected for column "
59 << i << " in channel " << ch << " (polar store = " 59 << i << " in channel " << ch << " (polar store = "
60 << polar << ")" << endl; 60 << polar << ")" << endl;
61 cerr << "expected : "; 61 cerr << "expected : ";
62 for (int j = 0; j < hs1; ++j) { 62 for (int j = 0; j < hs1; ++j) {
63 cerr << expectedValues[ch][j] << " "; 63 cerr << expectedValues[ch][j] << " ";
66 for (int j = 0; j < hs1; ++j) { 66 for (int j = 0; j < hs1; ++j) {
67 cerr << complex<float>(reals[j], imags[j]) << " "; 67 cerr << complex<float>(reals[j], imags[j]) << " ";
68 } 68 }
69 cerr << endl; 69 cerr << endl;
70 } 70 }
71 QCOMPARE(reals[i], eRe); 71 COMPARE_FUZZIER_F(reals[i], eRe);
72 QCOMPARE(imags[i], eIm); 72 COMPARE_FUZZIER_F(imags[i], eIm);
73 } 73 }
74 QCOMPARE(reals[hs1], 999.f); 74 QCOMPARE(reals[hs1], 999.f);
75 QCOMPARE(imags[hs1], 999.f); 75 QCOMPARE(imags[hs1], 999.f);
76 } 76 }
77 } 77 }