mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Trim spaces and avoid spaces in generated address text
* Trim spaces and avoid spaces in generated address text * Fix unit test
This commit is contained in:
parent
95f3490acd
commit
c8dbf3d125
@ -232,7 +232,12 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
|
||||
}
|
||||
else
|
||||
{
|
||||
allCurveAddressFilters.push_back( arguments[optionIdx] );
|
||||
// Remove space from address string https://github.com/OPM/ResInsight/issues/9707
|
||||
|
||||
QString stringWithoutSpaces = arguments[optionIdx];
|
||||
stringWithoutSpaces.remove( " " );
|
||||
|
||||
allCurveAddressFilters.push_back( stringWithoutSpaces );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -923,8 +923,9 @@ std::string RifEclipseSummaryAddress::baseVectorName( const std::string& vectorN
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RifEclipseSummaryAddress::blockAsString() const
|
||||
{
|
||||
return std::to_string( this->cellI() ) + ", " + std::to_string( this->cellJ() ) + ", " +
|
||||
std::to_string( this->cellK() );
|
||||
// Avoid space in address text https://github.com/OPM/ResInsight/issues/9707
|
||||
|
||||
return std::to_string( this->cellI() ) + "," + std::to_string( this->cellJ() ) + "," + std::to_string( this->cellK() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -993,7 +993,7 @@ TEST( RifKeywordBasedRsmspecParserTest, TestAddressCreation )
|
||||
|
||||
EXPECT_TRUE( address.isValid() );
|
||||
EXPECT_EQ( address.category(), RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR );
|
||||
EXPECT_EQ( address.uiText(), "LCABC:lgrName:wellName:12, 14, 16" );
|
||||
EXPECT_EQ( address.uiText(), "LCABC:lgrName:wellName:12,14,16" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -55,7 +55,7 @@ TEST( RiaSummaryAddressAnalyzer, WellCompletions )
|
||||
|
||||
auto completionsForB = analyzer.wellCompletions( wellNameB );
|
||||
EXPECT_EQ( 3u, completionsForB.size() );
|
||||
std::string tupleToFind = "5, 4, 30";
|
||||
std::string tupleToFind = "5,4,30";
|
||||
EXPECT_TRUE( completionsForB.find( tupleToFind ) != completionsForB.end() );
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ def test_summary_data(rips_instance, initialize_test):
|
||||
addresses = summary_case.available_addresses()
|
||||
# Summary reader type is controlled from Preferences. libecl reports 343 vectors, opm_common (ESMRY) reports 339.
|
||||
# As this configuration can be different, allow both variants
|
||||
assert len(addresses.values) == 343 or len(addresses.values) == 339
|
||||
assert len(addresses.values) == 335 or len(addresses.values) == 339
|
||||
|
||||
summary_data = summary_case.summary_vector_values("FOPT")
|
||||
assert len(summary_data.values) == 60
|
||||
|
Loading…
Reference in New Issue
Block a user