mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Resampler. New unit test
This commit is contained in:
parent
cc87da2ae0
commit
8c07e7d581
@ -245,6 +245,34 @@ TEST(RiaTimeHistoryCurveResampler, Test_Resampling_Week)
|
|||||||
EXPECT_EQ(toTime_t("2018-01-01"), resampler.resampledTimeSteps()[8]);
|
EXPECT_EQ(toTime_t("2018-01-01"), resampler.resampledTimeSteps()[8]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
TEST(RiaTimeHistoryCurveResampler, Test_Resampling_NoSampleCrossingPeriodBoundary)
|
||||||
|
{
|
||||||
|
std::vector<QString> timeStrings(
|
||||||
|
{
|
||||||
|
"2017-01-02",
|
||||||
|
"2017-06-15",
|
||||||
|
"2017-12-24"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
std::vector<double> dataValues(
|
||||||
|
{
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
RiaTimeHistoryCurveResampler resampler;
|
||||||
|
resampler.setCurveData(dataValues, toTime_tVector(timeStrings));
|
||||||
|
resampler.resampleAndComputeWeightedMeanValues(DateTimePeriod::YEAR);
|
||||||
|
|
||||||
|
EXPECT_EQ(0, (int)resampler.resampledTimeSteps().size());
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user