Add separate target for unit tests for easier test access. Remove unit tests from ResInsight application. (#11184)

Clean up cmake configuration a bit, and pull down gtest when needed, no longer use a thirdparty subfolder
Add a ResInsight-tests target to run the unit tests
This commit is contained in:
jonjenssen
2024-02-11 20:04:04 +01:00
committed by GitHub
parent 5a3894b804
commit 5391179e16
26 changed files with 268 additions and 27095 deletions

View File

@@ -315,7 +315,7 @@ bool RifCsvUserDataParser::parseColumnInfo( QTextStream*
if ( !columnInfoList ) return false;
columnInfoList->clear();
while ( !headerFound )
while ( !headerFound && dataStream->status() == QTextStream::Status::Ok )
{
QString line = dataStream->readLine();
if ( line.trimmed().isEmpty() )
@@ -341,7 +341,7 @@ bool RifCsvUserDataParser::parseColumnInfo( QTextStream*
auto startOfLineWithDataValues = dataStream->pos();
bool hasDataValues = false;
QString nameFromData;
while ( !hasDataValues )
while ( !hasDataValues && !dataStream->atEnd() )
{
QString candidateLine = dataStream->readLine();
@@ -374,6 +374,8 @@ bool RifCsvUserDataParser::parseColumnInfo( QTextStream*
}
}
if ( !hasDataValues ) break;
dataStream->seek( startOfLineWithDataValues );
int colCount = columnHeaders.size();