mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5216 Uppercase all property names ("kind") in well measurement import
This fixes the problem of mixed case.
This commit is contained in:
@@ -78,6 +78,35 @@ TEST( RifWellMeasurementReaderTest, ReadCorrectInputFile )
|
||||
ASSERT_EQ( "Poor test", wellMeasurements[1].remark.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifWellMeasurementReaderTest, KindsAreUppercased )
|
||||
{
|
||||
QTemporaryFile file;
|
||||
EXPECT_TRUE( file.open() );
|
||||
|
||||
{
|
||||
QTextStream out( &file );
|
||||
out << "NO 1234/1-2, 1234.56, 2019-11-13, LOT, 99.9, 3, Good test\n"
|
||||
<< "NO 1234/3-4, 2345.67, 2024-12-24, lot, 88.8, 1, Poor test\n"
|
||||
<< "NO 1234/5-6, 3456.78, 2026-12-24, lOt, 77.7, 2, Poor test\n";
|
||||
}
|
||||
|
||||
QStringList filePaths;
|
||||
filePaths.append( file.fileName() );
|
||||
|
||||
std::vector<RifWellMeasurement> wellMeasurements;
|
||||
RifWellMeasurementReader::readWellMeasurements( wellMeasurements, filePaths );
|
||||
|
||||
ASSERT_EQ( 3u, wellMeasurements.size() );
|
||||
|
||||
for ( unsigned int i = 0; i < wellMeasurements.size(); i++ )
|
||||
{
|
||||
ASSERT_EQ( "LOT", wellMeasurements[i].kind.toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Helper to check exception messages when reading invalid files
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user