! * test the load of a project created with v.2.6 that didn't have any ranges nor multiple coordinates systems yet. * upon loading the default coordinate system together with the ranges have to be created. */
| 104 | * upon loading the default coordinate system together with the ranges have to be created. |
| 105 | */ |
| 106 | void MultiRangeTest3::loadLegacyProject() { |
| 107 | Project project; |
| 108 | project.load(QFINDTESTDATA(QLatin1String("data/histogram_2.6.lml"))); |
| 109 | |
| 110 | // check the content |
| 111 | const auto& plots = project.children<CartesianPlot>(AbstractAspect::ChildIndexFlag::Recursive); |
| 112 | QCOMPARE(plots.size(), 1); |
| 113 | const auto* plot = plots.first(); |
| 114 | |
| 115 | const auto& histograms = plot->children<Histogram>(); |
| 116 | QCOMPARE(histograms.size(), 1); |
| 117 | const auto* histogram = histograms.first(); |
| 118 | |
| 119 | // check the ranges |
| 120 | QCOMPARE(plot->coordinateSystemCount(), 1); |
| 121 | CHECK_RANGE(plot, histogram, Dimension::X, 0., 6.); |
| 122 | CHECK_RANGE(plot, histogram, Dimension::Y, 0., 7.); |
| 123 | } |
| 124 | |
| 125 | QTEST_MAIN(MultiRangeTest3) |
nothing calls this directly
no test coverage detected