##// END OF EJS Templates
Separate the initialization of the properties of the graph of the update of the units of the graph....
Separate the initialization of the properties of the graph of the update of the units of the graph. The initialization of the properties is carried out when adding a variable in the graph, the update of the units is carried out when loading the data of this variable

File last commit:

r1019:fce4a3cd44f3
r1337:3acf26407503
Show More
DataSeriesTestsUtils.cpp
24 lines | 1.1 KiB | text/x-c | CppLexer
/ core / tests / Data / DataSeriesTestsUtils.cpp
Alexandre Leroux
Creates DataSeriesUtils file that will contain methods for handling data holes...
r1019 #include "DataSeriesTestsUtils.h"
Alexandre Leroux
Unit tests (2): Refactoring...
r871
void validateRange(DataSeriesIterator first, DataSeriesIterator last, const DataContainer &xData,
const DataContainer &valuesData)
{
QVERIFY(std::equal(first, last, xData.cbegin(), xData.cend(),
[](const auto &it, const auto &expectedX) { return it.x() == expectedX; }));
QVERIFY(std::equal(
first, last, valuesData.cbegin(), valuesData.cend(),
[](const auto &it, const auto &expectedVal) { return it.value() == expectedVal; }));
}
void validateRange(DataSeriesIterator first, DataSeriesIterator last, const DataContainer &xData, const std::vector<DataContainer> &valuesData)
{
QVERIFY(std::equal(first, last, xData.cbegin(), xData.cend(),
[](const auto &it, const auto &expectedX) { return it.x() == expectedX; }));
Alexandre Leroux
Removes compilation warnings (with Meson)
r1004 for (auto i = 0u; i < valuesData.size(); ++i) {
Alexandre Leroux
Unit tests (2): Refactoring...
r871 auto componentData = valuesData.at(i);
QVERIFY(std::equal(
first, last, componentData.cbegin(), componentData.cend(),
[i](const auto &it, const auto &expectedVal) { return it.value(i) == expectedVal; }));
}
}