| 99 | } |
| 100 | |
| 101 | void DatapickerTest::maplnXToCartesian() { |
| 102 | DatapickerImage::ReferencePoints points; |
| 103 | points.type = DatapickerImage::GraphType::LnX; |
| 104 | points.logicalPos[0].setX(exp(1)); |
| 105 | points.logicalPos[0].setY(2); |
| 106 | points.logicalPos[1].setX(exp(2)); |
| 107 | points.logicalPos[1].setY(4); |
| 108 | points.logicalPos[2].setX(exp(3)); |
| 109 | points.logicalPos[2].setY(6); |
| 110 | points.scenePos[0].setX(6.21); |
| 111 | points.scenePos[0].setY(7.23); |
| 112 | points.scenePos[1].setX(-51.2); |
| 113 | points.scenePos[1].setY(3234); |
| 114 | points.scenePos[2].setX(-23); |
| 115 | points.scenePos[2].setY(+5e6); |
| 116 | |
| 117 | Transform t; |
| 118 | QCOMPARE(t.mapTypeToCartesian(points), true); |
| 119 | VALUES_EQUAL(t.x[0], 1.); |
| 120 | VALUES_EQUAL(t.y[0], 2.); |
| 121 | VALUES_EQUAL(t.x[1], 2.); |
| 122 | VALUES_EQUAL(t.y[1], 4.); |
| 123 | VALUES_EQUAL(t.x[2], 3.); |
| 124 | VALUES_EQUAL(t.y[2], 6.); |
| 125 | VALUES_EQUAL(t.X[0], 6.21); |
| 126 | VALUES_EQUAL(t.Y[0], 7.23); |
| 127 | VALUES_EQUAL(t.X[1], -51.2); |
| 128 | VALUES_EQUAL(t.Y[1], 3234.); |
| 129 | VALUES_EQUAL(t.X[2], -23.); |
| 130 | VALUES_EQUAL(t.Y[2], +5.e6); |
| 131 | } |
| 132 | |
| 133 | void DatapickerTest::maplnYToCartesian() { |
| 134 | DatapickerImage::ReferencePoints points; |
nothing calls this directly
no test coverage detected