mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 07:30:20 -05:00
#12177 Summary Ensemble: Improve automatic naming
This commit is contained in:
1 parent
d05de77748
commit
edeb0cdbe2
32 files changed
+761
-201
No files matched your search
@@ -1,6 +1,5 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "RiaEnsembleNameTools.h"
|
||||
#include "RiaFilePathTools.h"
|
||||
|
||||
#include <iostream>
|
||||
@@ -152,37 +151,6 @@ TEST( RiaFilePathTools, splitIntoComponets )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RiaFilePathTools, EnsembleName )
|
||||
{
|
||||
{
|
||||
QString testPath1( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-0/iter-3/eclipse/model/DROGON-0.SMSPEC" );
|
||||
QString testPath2( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-1/iter-3/eclipse/model/DROGON-1.SMSPEC" );
|
||||
QStringList allPaths = { testPath1, testPath2 };
|
||||
|
||||
auto ensembleName =
|
||||
RiaEnsembleNameTools::findSuitableEnsembleName( allPaths, RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE );
|
||||
|
||||
EXPECT_EQ( QString( "iter-3" ), ensembleName );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RiaFilePathTools, RealizationName )
|
||||
{
|
||||
{
|
||||
QString testPath0( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-0/iter-3/eclipse/model/DROGON-0.SMSPEC" );
|
||||
QString testPath1( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-1/iter-3/eclipse/model/DROGON-1.SMSPEC" );
|
||||
QStringList allPaths = { testPath0, testPath1 };
|
||||
|
||||
QString fileName = "DROGON-0.SMSPEC";
|
||||
|
||||
auto name = RiaEnsembleNameTools::uniqueShortName( testPath1, allPaths, fileName );
|
||||
|
||||
EXPECT_EQ( QString( "real-1" ), name );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RiaFilePathTools, keyPathComponentsForEachFilePath )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user