comparison base/test/TestRangeMapper.h @ 1328:ccc8658914ef 3.0-integration

Merge from branch 3.0-integration
author Chris Cannam
date Wed, 14 Dec 2016 14:28:41 +0000
parents 12a6140b3ae0
children 48e9f538e6e9
comparison
equal deleted inserted replaced
1327:7d24f92158a7 1328:ccc8658914ef
75 QCOMPARE(rm.getValueForPosition(6), 3.0); 75 QCOMPARE(rm.getValueForPosition(6), 3.0);
76 QCOMPARE(rm.getValueForPosition(7), 3.5); 76 QCOMPARE(rm.getValueForPosition(7), 3.5);
77 QCOMPARE(rm.getValueForPosition(0), rm.getValueForPosition(1)); 77 QCOMPARE(rm.getValueForPosition(0), rm.getValueForPosition(1));
78 QCOMPARE(rm.getValueForPosition(9), rm.getValueForPosition(8)); 78 QCOMPARE(rm.getValueForPosition(9), rm.getValueForPosition(8));
79 QCOMPARE(rm.getValueForPositionUnclamped(6), 3.0); 79 QCOMPARE(rm.getValueForPositionUnclamped(6), 3.0);
80 QCOMPARE(rm.getValueForPositionUnclamped(0), 0.0); 80 QCOMPARE(rm.getValueForPositionUnclamped(0) + 1.0, 0.0 + 1.0);
81 QCOMPARE(rm.getValueForPositionUnclamped(-24), -12.0); 81 QCOMPARE(rm.getValueForPositionUnclamped(-24), -12.0);
82 QCOMPARE(rm.getValueForPositionUnclamped(12), 6.0); 82 QCOMPARE(rm.getValueForPositionUnclamped(12), 6.0);
83 } 83 }
84 84
85 void linearDownBackward() 85 void linearDownBackward()
91 QCOMPARE(rm.getValueForPosition(3), 3.0); 91 QCOMPARE(rm.getValueForPosition(3), 3.0);
92 QCOMPARE(rm.getValueForPosition(2), 3.5); 92 QCOMPARE(rm.getValueForPosition(2), 3.5);
93 QCOMPARE(rm.getValueForPosition(0), rm.getValueForPosition(1)); 93 QCOMPARE(rm.getValueForPosition(0), rm.getValueForPosition(1));
94 QCOMPARE(rm.getValueForPosition(9), rm.getValueForPosition(8)); 94 QCOMPARE(rm.getValueForPosition(9), rm.getValueForPosition(8));
95 QCOMPARE(rm.getValueForPositionUnclamped(3), 3.0); 95 QCOMPARE(rm.getValueForPositionUnclamped(3), 3.0);
96 QCOMPARE(rm.getValueForPositionUnclamped(9), 0.0); 96 QCOMPARE(rm.getValueForPositionUnclamped(9) + 1.0, 0.0 + 1.0);
97 QCOMPARE(rm.getValueForPositionUnclamped(33), -12.0); 97 QCOMPARE(rm.getValueForPositionUnclamped(33), -12.0);
98 QCOMPARE(rm.getValueForPositionUnclamped(-3), 6.0); 98 QCOMPARE(rm.getValueForPositionUnclamped(-3), 6.0);
99 } 99 }
100 100
101 void logUpForward() 101 void logUpForward()