| 67 | } // anonymous namespace |
| 68 | |
| 69 | void DatapickerTest::mapCartesianToCartesian() { |
| 70 | DatapickerImage::ReferencePoints points; |
| 71 | points.type = DatapickerImage::GraphType::Linear; |
| 72 | points.logicalPos[0].setX(1); |
| 73 | points.logicalPos[0].setY(2); |
| 74 | points.logicalPos[1].setX(3); |
| 75 | points.logicalPos[1].setY(4); |
| 76 | points.logicalPos[2].setX(5); |
| 77 | points.logicalPos[2].setY(6); |
| 78 | points.scenePos[0].setX(6.21); |
| 79 | points.scenePos[0].setY(7.23); |
| 80 | points.scenePos[1].setX(-51.2); |
| 81 | points.scenePos[1].setY(3234); |
| 82 | points.scenePos[2].setX(-23); |
| 83 | points.scenePos[2].setY(+5e6); |
| 84 | |
| 85 | Transform t; |
| 86 | QCOMPARE(t.mapTypeToCartesian(points), true); |
| 87 | VALUES_EQUAL(t.x[0], 1.); |
| 88 | VALUES_EQUAL(t.y[0], 2.); |
| 89 | VALUES_EQUAL(t.x[1], 3.); |
| 90 | VALUES_EQUAL(t.y[1], 4.); |
| 91 | VALUES_EQUAL(t.x[2], 5.); |
| 92 | VALUES_EQUAL(t.y[2], 6.); |
| 93 | VALUES_EQUAL(t.X[0], 6.21); |
| 94 | VALUES_EQUAL(t.Y[0], 7.23); |
| 95 | VALUES_EQUAL(t.X[1], -51.2); |
| 96 | VALUES_EQUAL(t.Y[1], 3234.); |
| 97 | VALUES_EQUAL(t.X[2], -23.); |
| 98 | VALUES_EQUAL(t.Y[2], +5.e6); |
| 99 | } |
| 100 | |
| 101 | void DatapickerTest::maplnXToCartesian() { |
| 102 | DatapickerImage::ReferencePoints points; |
nothing calls this directly
no test coverage detected