mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update unit tests to accomodate changes in PolyArcLineSampler
This commit is contained in:
@@ -14,7 +14,7 @@ TEST( RiaPolyArcLineSampler, Basic )
|
|||||||
std::vector<double> mds;
|
std::vector<double> mds;
|
||||||
|
|
||||||
sampler.sampledPointsAndMDs( 2, true, &sampledPoints, &mds );
|
sampler.sampledPointsAndMDs( 2, true, &sampledPoints, &mds );
|
||||||
#if 0
|
#if 1
|
||||||
for (size_t pIdx = 0; pIdx < sampledPoints.size(); ++pIdx)
|
for (size_t pIdx = 0; pIdx < sampledPoints.size(); ++pIdx)
|
||||||
{
|
{
|
||||||
std::cout << sampledPoints[pIdx].x() << " "
|
std::cout << sampledPoints[pIdx].x() << " "
|
||||||
@@ -22,14 +22,14 @@ TEST( RiaPolyArcLineSampler, Basic )
|
|||||||
<< sampledPoints[pIdx].z() << " md: " << mds[pIdx] << std::endl;
|
<< sampledPoints[pIdx].z() << " md: " << mds[pIdx] << std::endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
EXPECT_EQ( 27, (int)sampledPoints.size() );
|
EXPECT_EQ( 55, (int)sampledPoints.size() );
|
||||||
EXPECT_NEAR( 51.4159, mds.back(), 1e-4 );
|
EXPECT_NEAR( 51.4159, mds.back(), 1e-4 );
|
||||||
|
|
||||||
EXPECT_NEAR( points[2].y(), sampledPoints[12].y(), 2 );
|
EXPECT_NEAR( points[2].y(), sampledPoints[27].y(), 2 );
|
||||||
EXPECT_NEAR( points[2].z(), sampledPoints[12].z(), 2 );
|
EXPECT_NEAR( points[2].z(), sampledPoints[27].z(), 2 );
|
||||||
|
|
||||||
EXPECT_NEAR( points[4].y(), sampledPoints[25].y(), 2 );
|
EXPECT_NEAR( points[4].y(), sampledPoints.back().y(), 2 );
|
||||||
EXPECT_NEAR( points[4].z(), sampledPoints[25].z(), 2 );
|
EXPECT_NEAR( points[4].z(), sampledPoints.back().z(), 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user