ResInsight/ApplicationLibCode/UnitTests/RifStimPlanModelDeviationFrkExporter-Test.cpp
Magne Sjaastad f8c5cf389f
clang-format: Set column width to 140
* Set column width to 140
* Use c++20
* Remove redundant virtual
2023-02-26 10:48:40 +01:00

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 );
}
}