| 163 | } |
| 164 | |
| 165 | void DatapickerTest::maplnXYToCartesian() { |
| 166 | DatapickerImage::ReferencePoints points; |
| 167 | points.type = DatapickerImage::GraphType::LnXY; |
| 168 | points.logicalPos[0].setX(exp(5)); |
| 169 | points.logicalPos[0].setY(exp(1)); |
| 170 | points.logicalPos[1].setX(exp(6)); |
| 171 | points.logicalPos[1].setY(exp(2)); |
| 172 | points.logicalPos[2].setX(exp(7)); |
| 173 | points.logicalPos[2].setY(exp(3)); |
| 174 | points.scenePos[0].setX(6.21); |
| 175 | points.scenePos[0].setY(7.23); |
| 176 | points.scenePos[1].setX(-51.2); |
| 177 | points.scenePos[1].setY(3234); |
| 178 | points.scenePos[2].setX(-23); |
| 179 | points.scenePos[2].setY(+5e6); |
| 180 | |
| 181 | Transform t; |
| 182 | QCOMPARE(t.mapTypeToCartesian(points), true); |
| 183 | VALUES_EQUAL(t.x[0], 5.); |
| 184 | VALUES_EQUAL(t.y[0], 1.); |
| 185 | VALUES_EQUAL(t.x[1], 6.); |
| 186 | VALUES_EQUAL(t.y[1], 2.); |
| 187 | VALUES_EQUAL(t.x[2], 7.); |
| 188 | VALUES_EQUAL(t.y[2], 3.); |
| 189 | VALUES_EQUAL(t.X[0], 6.21); |
| 190 | VALUES_EQUAL(t.Y[0], 7.23); |
| 191 | VALUES_EQUAL(t.X[1], -51.2); |
| 192 | VALUES_EQUAL(t.Y[1], 3234.); |
| 193 | VALUES_EQUAL(t.X[2], -23.); |
| 194 | VALUES_EQUAL(t.Y[2], +5.e6); |
| 195 | } |
| 196 | |
| 197 | void DatapickerTest::maplog10XToCartesian() { |
| 198 | DatapickerImage::ReferencePoints points; |
nothing calls this directly
no test coverage detected