2025-06-30 12:47:56 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2025- Equinor ASA
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
|
|
#include "RifRmsWellPathReader.h"
|
|
|
|
|
|
|
|
|
|
#include "RiaTestDataDirectory.h"
|
|
|
|
|
|
|
|
|
|
static const QString TEST_DATA_DIRECTORY = QString( "%1/RifRmsWellPathReader/" ).arg( TEST_DATA_DIR );
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
TEST( RifRmsWellPathReader, ReadFromFile )
|
|
|
|
|
{
|
|
|
|
|
QString filePath = TEST_DATA_DIRECTORY + "55_33-1.rmswell";
|
|
|
|
|
auto wellData = RifRmsWellPathReader::readWellData( filePath );
|
|
|
|
|
EXPECT_EQ( wellData.m_name, QString( "55_33-1" ) );
|
|
|
|
|
|
|
|
|
|
auto wellPath = wellData.m_wellPathGeometry;
|
|
|
|
|
ASSERT_TRUE( wellPath.notNull() );
|
|
|
|
|
|
2025-12-15 10:35:41 +01:00
|
|
|
ASSERT_TRUE( wellPath->hasDatumElevation() );
|
|
|
|
|
EXPECT_DOUBLE_EQ( 25.0, wellPath->datumElevation() );
|
2025-06-30 12:47:56 +02:00
|
|
|
EXPECT_EQ( 4647u, wellPath->wellPathPoints().size() );
|
|
|
|
|
EXPECT_EQ( 4647u, wellPath->measuredDepths().size() );
|
|
|
|
|
}
|
2026-02-02 11:35:47 +01:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
TEST( RifRmsWellPathReader, ReadFromFileWithSpaceInName )
|
|
|
|
|
{
|
|
|
|
|
QString filePath = TEST_DATA_DIRECTORY + "well_with_space.rmswell";
|
|
|
|
|
auto wellData = RifRmsWellPathReader::readWellData( filePath );
|
|
|
|
|
EXPECT_EQ( wellData.m_name, QString( "55 33-1" ) );
|
|
|
|
|
|
|
|
|
|
auto wellPath = wellData.m_wellPathGeometry;
|
|
|
|
|
ASSERT_TRUE( wellPath.notNull() );
|
|
|
|
|
|
|
|
|
|
ASSERT_TRUE( wellPath->hasDatumElevation() );
|
|
|
|
|
EXPECT_DOUBLE_EQ( 25.0, wellPath->datumElevation() );
|
|
|
|
|
EXPECT_EQ( 2u, wellPath->wellPathPoints().size() );
|
|
|
|
|
EXPECT_EQ( 2u, wellPath->measuredDepths().size() );
|
|
|
|
|
}
|