Skip to content

Commit

Permalink
Add Windows resource files for expected plot images.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Jan 12, 2025
1 parent b508e80 commit 984fe09
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 30 deletions.
9 changes: 0 additions & 9 deletions tests/BasicDataPlotTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ void BasicDataPlotTest::testPlotWithData()
BasicDataPlot plot;
preparePlot(plot);

// const QImage actual{plot.grab().toImage()};
// actual.save("BasicDataPlotDefault.png");

const QString expectedPath{QString::fromLatin1("BasicDataPlotDefault.png")};
common::checkPlot(plot, expectedPath);
}
Expand All @@ -77,9 +74,6 @@ void BasicDataPlotTest::testPlotWithoutData()
plot.setNewData({}, quantiles, regressionPoints);
plot.resize(common::getPlotSize());

// const QImage actual{plot.grab().toImage()};
// actual.save("BasicDataPlotEmpty.png");

const QString expectedPath{QString::fromLatin1("BasicDataPlotEmpty.png")};
common::checkPlot(plot, expectedPath);
}
Expand All @@ -93,9 +87,6 @@ void BasicDataPlotTest::testLegendItemsChecking()
emit legend->checked(common::getItemInfo(plot, QStringLiteral("Q25")),
false, 0);

// const QImage actual{plot.grab().toImage()};
// actual.save("BasicDataPlotItemChecked.png");

const QString expectedPath{
QString::fromLatin1("BasicDataPlotItemChecked.png")};
common::checkPlot(plot, expectedPath);
Expand Down
6 changes: 0 additions & 6 deletions tests/GroupPlotTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ void GroupPlotTest::testPlotWithData()
GroupPlot plot;
preparePlot(plot);

// const QImage actual{plot.grab().toImage()};
// actual.save("GroupPlotDefault.png");

const QString expectedPath{QString::fromLatin1("GroupPlotDefault.png")};
common::checkPlot(plot, expectedPath);
}
Expand All @@ -49,9 +46,6 @@ void GroupPlotTest::testPlotWithoutData()
plot.setNewData({}, {});
plot.resize(common::getPlotSize());

// const QImage actual{plot.grab().toImage()};
// actual.save("GroupPlotPlotWithoutData.png");

const QString expectedPath{
QString::fromLatin1("GroupPlotPlotWithoutData.png")};
common::checkPlot(plot, expectedPath);
Expand Down
9 changes: 0 additions & 9 deletions tests/HistogramPlotTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ void HistogramPlotTest::testPlotWithData()
HistogramPlot plot;
preparePlot(plot);

// const QImage actual{plot.grab().toImage()};
// actual.save("HistogramPlotDefault.png");

const QString expectedPath{QString::fromLatin1("HistogramPlotDefault.png")};
common::checkPlot(plot, expectedPath);
}
Expand All @@ -43,9 +40,6 @@ void HistogramPlotTest::testPlotWithoutData()
plot.setNewData({}, {}, 10);
plot.resize(common::getPlotSize());

// const QImage actual{plot.grab().toImage()};
// actual.save("HistogramPlotWithoutData.png");

const QString expectedPath{
QString::fromLatin1("HistogramPlotWithoutData.png")};
common::checkPlot(plot, expectedPath);
Expand All @@ -60,9 +54,6 @@ void HistogramPlotTest::testLegendItemsChecking()
emit legend->checked(common::getItemInfo(plot, QStringLiteral("Histogram")),
false, 0);

// const QImage actual{plot.grab().toImage()};
// actual.save("HistogramPlotItemChecked.png");

const QString expectedPath{
QString::fromLatin1("HistogramPlotItemChecked.png")};
common::checkPlot(plot, expectedPath);
Expand Down
6 changes: 0 additions & 6 deletions tests/QuantilesPlotTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ void QuantilesPlotTest::testPlotWithData()
QuantilesPlot plot;
preparePlot(plot);

// const QImage actual{plot.grab().toImage()};
// actual.save("QuantilesPlotDefault.png");

const QString expectedPath{QString::fromLatin1("QuantilesPlotDefault.png")};
common::checkPlot(plot, expectedPath);
}
Expand All @@ -35,9 +32,6 @@ void QuantilesPlotTest::testPlotWithoutData()
plot.setNewData({});
plot.resize(common::getPlotSize());

// const QImage actual{plot.grab().toImage()};
// actual.save("QuantilesPlotWithoutData.png");

const QString expectedPath{
QString::fromLatin1("QuantilesPlotWithoutData.png")};
common::checkPlot(plot, expectedPath);
Expand Down
Binary file added tests/res/windows/BasicDataPlotDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/BasicDataPlotEmpty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/BasicDataPlotItemChecked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/GroupPlotDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/GroupPlotPlotWithoutData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/HistogramPlotDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/HistogramPlotItemChecked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/HistogramPlotWithoutData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/QuantilesPlotDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/res/windows/QuantilesPlotWithoutData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions tests/testResources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@
<file>res/unix-like/QuantilesPlotDefault.png</file>
<file>res/unix-like/QuantilesPlotWithoutData.png</file>
</qresource>
<qresource prefix="/windows">
<file>res/windows/BasicDataPlotDefault.png</file>
<file>res/windows/BasicDataPlotEmpty.png</file>
<file>res/windows/BasicDataPlotItemChecked.png</file>
<file>res/windows/HistogramPlotDefault.png</file>
<file>res/windows/HistogramPlotWithoutData.png</file>
<file>res/windows/HistogramPlotItemChecked.png</file>
<file>res/windows/GroupPlotDefault.png</file>
<file>res/windows/GroupPlotPlotWithoutData.png</file>
<file>res/windows/QuantilesPlotDefault.png</file>
<file>res/windows/QuantilesPlotWithoutData.png</file>
</qresource>
</RCC>

0 comments on commit 984fe09

Please sign in to comment.