mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
Observed data parsing. Add address creation unit test
This commit is contained in:
parent
40e9151069
commit
f7ac8fe6e4
@ -338,7 +338,7 @@ std::tuple<int, int, int> RifEclipseSummaryAddress::ijkTupleFromUiText(const std
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RifEclipseSummaryAddress::formatUiTextRegionToRegion() const
|
||||
{
|
||||
return std::to_string(this->regionNumber()) + " -> "
|
||||
return std::to_string(this->regionNumber()) + " - "
|
||||
+ std::to_string(this->regionNumber2());
|
||||
}
|
||||
|
||||
|
@ -784,6 +784,24 @@ TEST(RifKeywordBasedRsmspecParserTest, TestTimeSteps)
|
||||
EXPECT_TRUE(firstDate == QDateTime::fromTime_t(timeSteps[0]));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST(RifKeywordBasedRsmspecParserTest, TestAddressCreation)
|
||||
{
|
||||
std::string quantityName = "LCABC";
|
||||
std::vector< std::string > headerColumn;
|
||||
headerColumn.push_back("wellName");
|
||||
headerColumn.push_back("lgrName");
|
||||
headerColumn.push_back("12 14 16");
|
||||
|
||||
RifEclipseSummaryAddress address = RifEclipseUserDataKeywordTools::makeAndFillAddress(quantityName, headerColumn);
|
||||
|
||||
EXPECT_TRUE(address.isValid());
|
||||
EXPECT_EQ(address.category(), RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR);
|
||||
EXPECT_EQ(address.uiText(), "LCABC:lgrName:wellName:12, 14, 16");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user