diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp index a22f7eb6ad..66c0c74b60 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp @@ -338,7 +338,7 @@ std::tuple 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()); } diff --git a/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp b/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp index 275e3b8a28..348ccd8027 100644 --- a/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp +++ b/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp @@ -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"); +} + //-------------------------------------------------------------------------------------------------- /// //--------------------------------------------------------------------------------------------------