Improve curve naming for plot and use in RFT segment plots

* Improve plot naming for depth track plots
* Move template text replace to string tools
* More data available for object template text
* Set plot visible and define default object name template text
This commit is contained in:
Magne Sjaastad
2022-10-12 12:41:08 +02:00
committed by GitHub
parent 5e184df670
commit e7a486c802
29 changed files with 373 additions and 203 deletions

View File

@@ -342,3 +342,29 @@ WELSPECS
EXPECT_STREQ( textForCompare.toStdString().data(), tableText.toStdString().data() );
}
}
TEST( RifTextDataTableFormatter, ReplaceTokensInString )
{
{
std::map<QString, QString> keyValues = {
{ "$KEY1", "VALUE1" },
{ "$KEY1_WITH_MORE_TEXT", "VALUE2" },
};
auto templateText = QString( "$KEY1, $KEY1_WITH_MORE_TEXT" );
auto resolvedText = RiaTextStringTools::replaceTemplateTextWithValues( templateText, keyValues );
EXPECT_STREQ( resolvedText.toStdString().data(), "VALUE1, VALUE2" );
}
{
std::map<QString, QString> keyValues = {
{ "$KEY1", "VALUE1" },
};
auto templateText = QString( "$KEY1, $KEY1_WITH_MORE_2" );
auto resolvedText = RiaTextStringTools::replaceTemplateTextWithValues( templateText, keyValues );
EXPECT_STREQ( resolvedText.toStdString().data(), "VALUE1, $KEY1_WITH_MORE_2" );
}
}