mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-20 21:43:20 -06:00
#7494 Summary Plot: Lumped completions short names are wrong
Replace tabs in summary quantity name with space
This commit is contained in:
parent
f5547dd551
commit
4a61226926
@ -289,6 +289,8 @@ std::string stringFromPointer( const char* pointerToChar )
|
|||||||
if ( pointerToChar )
|
if ( pointerToChar )
|
||||||
{
|
{
|
||||||
myString = pointerToChar;
|
myString = pointerToChar;
|
||||||
|
|
||||||
|
replace( myString.begin(), myString.end(), '\t', ' ' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return myString;
|
return myString;
|
||||||
|
@ -41,3 +41,19 @@ TEST( RiaStdStringToolsTest, EditDistance )
|
|||||||
EXPECT_EQ( 3, RiaStdStringTools::computeEditDistance( "Saturday", "Sunday" ) );
|
EXPECT_EQ( 3, RiaStdStringTools::computeEditDistance( "Saturday", "Sunday" ) );
|
||||||
EXPECT_EQ( 3, RiaStdStringTools::computeEditDistance( "Sunday", "Saturday" ) );
|
EXPECT_EQ( 3, RiaStdStringTools::computeEditDistance( "Sunday", "Saturday" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
TEST( RiaStdStringToolsTest, TrimStrings )
|
||||||
|
{
|
||||||
|
// Test replace of tabs with space
|
||||||
|
{
|
||||||
|
std::string text = "test\t\tnext word";
|
||||||
|
|
||||||
|
replace( text.begin(), text.end(), '\t', ' ' );
|
||||||
|
|
||||||
|
std::string expectedText = "test next word";
|
||||||
|
EXPECT_EQ( text, expectedText );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user