mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-03 20:57:39 -06:00
f8c5cf389f
* Set column width to 140 * Use c++20 * Remove redundant virtual
28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
#include "gtest/gtest.h"
|
|
|
|
#include "RifStimPlanModelDeviationFrkExporter.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
TEST( RifStimPlanModelDeviationFrkExporterTest, TvdFixup )
|
|
{
|
|
std::vector<double> tvd = { 475.722, 492.126, 508.53, 524.934, 541.338, 557.743, 574.147, 590.551, 606.955, 623.359, 639.764, 656.168, 672.572 };
|
|
std::vector<double> md = { 475.722, 492.126, 508.53, 524.934, 541.339, 557.743, 574.147, 590.551, 606.955, 623.36, 639.764, 656.168, 672.572 };
|
|
|
|
std::vector<double> exportTvd;
|
|
std::vector<double> exportMd;
|
|
|
|
RifStimPlanModelDeviationFrkExporter::fixupDepthValuesForExport( tvd, md, exportTvd, exportMd );
|
|
|
|
EXPECT_EQ( tvd.size(), exportTvd.size() );
|
|
EXPECT_EQ( md.size(), exportMd.size() );
|
|
|
|
for ( size_t i = 1; i < exportMd.size(); i++ )
|
|
{
|
|
double changeMd = exportMd[i] - exportMd[i - 1];
|
|
double changeTvd = exportTvd[i] - exportTvd[i - 1];
|
|
ASSERT_GE( changeMd, changeTvd );
|
|
}
|
|
}
|