Unity build requires global unique variable names

This commit is contained in:
Magne Sjaastad 2022-07-07 10:01:03 +02:00
parent b9c21289d0
commit be8c796bb0
3 changed files with 11 additions and 11 deletions

View File

@ -8,7 +8,7 @@
#include <QString> #include <QString>
#include <numeric> #include <numeric>
static const QString CASE_REAL_TEST_DATA_DIRECTORY = static const QString CASE_REAL_TEST_DATA_DIRECTORY_01 =
QString( "%1/RifCaseRealizationParametersReader/" ).arg( TEST_DATA_DIR ); QString( "%1/RifCaseRealizationParametersReader/" ).arg( TEST_DATA_DIR );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -16,8 +16,8 @@ static const QString CASE_REAL_TEST_DATA_DIRECTORY =
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifCaseRealizationParametersReaderTest, LocatorTestSuccess ) TEST( RifCaseRealizationParametersReaderTest, LocatorTestSuccess )
{ {
QString file = RifCaseRealizationParametersFileLocator::locate( CASE_REAL_TEST_DATA_DIRECTORY + "4/3/2" ); QString file = RifCaseRealizationParametersFileLocator::locate( CASE_REAL_TEST_DATA_DIRECTORY_01 + "4/3/2" );
QString expected = CASE_REAL_TEST_DATA_DIRECTORY + "parameters.txt"; QString expected = CASE_REAL_TEST_DATA_DIRECTORY_01 + "parameters.txt";
EXPECT_EQ( expected.toStdString(), file.toStdString() ); EXPECT_EQ( expected.toStdString(), file.toStdString() );
} }
@ -26,7 +26,7 @@ TEST( RifCaseRealizationParametersReaderTest, LocatorTestSuccess )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifCaseRealizationParametersReaderTest, LocatorTestFailure ) TEST( RifCaseRealizationParametersReaderTest, LocatorTestFailure )
{ {
QString file = RifCaseRealizationParametersFileLocator::locate( CASE_REAL_TEST_DATA_DIRECTORY + "4/3/2/1" ); QString file = RifCaseRealizationParametersFileLocator::locate( CASE_REAL_TEST_DATA_DIRECTORY_01 + "4/3/2/1" );
QString expected = ""; QString expected = "";
EXPECT_EQ( expected.toStdString(), file.toStdString() ); EXPECT_EQ( expected.toStdString(), file.toStdString() );
} }
@ -36,7 +36,7 @@ TEST( RifCaseRealizationParametersReaderTest, LocatorTestFailure )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifCaseRealizationParametersReaderTest, SuccessfulParsing ) TEST( RifCaseRealizationParametersReaderTest, SuccessfulParsing )
{ {
RifCaseRealizationParametersReader reader( CASE_REAL_TEST_DATA_DIRECTORY + "parameters.txt" ); RifCaseRealizationParametersReader reader( CASE_REAL_TEST_DATA_DIRECTORY_01 + "parameters.txt" );
try try
{ {

View File

@ -5,14 +5,14 @@
#include "RifStimPlanXmlReader.h" #include "RifStimPlanXmlReader.h"
#include "RigStimPlanFractureDefinition.h" #include "RigStimPlanFractureDefinition.h"
static const QString CASE_REAL_TEST_DATA_DIRECTORY = QString( "%1/RifStimPlanXmlReader/" ).arg( TEST_DATA_DIR ); static const QString CASE_REAL_TEST_DATA_DIRECTORY_02 = QString( "%1/RifStimPlanXmlReader/" ).arg( TEST_DATA_DIR );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifStimPlanXmlReaderTest, LoadFile ) TEST( RifStimPlanXmlReaderTest, LoadFile )
{ {
QString fileName = CASE_REAL_TEST_DATA_DIRECTORY + "small_fracture.xml"; QString fileName = CASE_REAL_TEST_DATA_DIRECTORY_02 + "small_fracture.xml";
double conductivityScaleFactor = 1.0; double conductivityScaleFactor = 1.0;
RiaDefines::EclipseUnitSystem unit = RiaDefines::EclipseUnitSystem::UNITS_METRIC; RiaDefines::EclipseUnitSystem unit = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
@ -38,7 +38,7 @@ TEST( RifStimPlanXmlReaderTest, LoadFile )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifStimPlanXmlReaderTest, LoadFileNewFormat ) TEST( RifStimPlanXmlReaderTest, LoadFileNewFormat )
{ {
QString fileName = CASE_REAL_TEST_DATA_DIRECTORY + "contour_Metric.xml"; QString fileName = CASE_REAL_TEST_DATA_DIRECTORY_02 + "contour_Metric.xml";
double conductivityScaleFactor = 1.0; double conductivityScaleFactor = 1.0;
RiaDefines::EclipseUnitSystem unit = RiaDefines::EclipseUnitSystem::UNITS_METRIC; RiaDefines::EclipseUnitSystem unit = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
@ -69,7 +69,7 @@ TEST( RifStimPlanXmlReaderTest, LoadFileNewFormat )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifStimPlanXmlReaderTest, LoadFileNewFormatExtraParameters ) TEST( RifStimPlanXmlReaderTest, LoadFileNewFormatExtraParameters )
{ {
QString fileName = CASE_REAL_TEST_DATA_DIRECTORY + "contour_with_extra_parameters.xml"; QString fileName = CASE_REAL_TEST_DATA_DIRECTORY_02 + "contour_with_extra_parameters.xml";
double conductivityScaleFactor = 1.0; double conductivityScaleFactor = 1.0;
RiaDefines::EclipseUnitSystem unit = RiaDefines::EclipseUnitSystem::UNITS_METRIC; RiaDefines::EclipseUnitSystem unit = RiaDefines::EclipseUnitSystem::UNITS_METRIC;

View File

@ -5,14 +5,14 @@
#include "RifThermalFractureReader.h" #include "RifThermalFractureReader.h"
#include "RigThermalFractureDefinition.h" #include "RigThermalFractureDefinition.h"
static const QString CASE_REAL_TEST_DATA_DIRECTORY = QString( "%1/RifThermalFractureReader/" ).arg( TEST_DATA_DIR ); static const QString CASE_REAL_TEST_DATA_DIRECTORY_03 = QString( "%1/RifThermalFractureReader/" ).arg( TEST_DATA_DIR );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
TEST( RifThermalFractureReaderTest, LoadFile ) TEST( RifThermalFractureReaderTest, LoadFile )
{ {
QString fileName = CASE_REAL_TEST_DATA_DIRECTORY + "fracture_metric.csv"; QString fileName = CASE_REAL_TEST_DATA_DIRECTORY_03 + "fracture_metric.csv";
auto [fractureData, errorMessage] = RifThermalFractureReader::readFractureCsvFile( fileName ); auto [fractureData, errorMessage] = RifThermalFractureReader::readFractureCsvFile( fileName );