Stabilization fixes related to regression testing

* Added fmtlib to LicenseInformation.txt
* Add license info for roffcpp
* Regression Tests: Guard use of invalid bounding box
* Regression Test: Check if file is present before opening
This commit is contained in:
Magne Sjaastad
2023-01-10 11:45:37 +01:00
committed by GitHub
parent 0740bccd75
commit 8e161a5c89
5 changed files with 66 additions and 2 deletions

View File

@@ -28,6 +28,7 @@
#include "RiaPreferencesSystem.h"
#include "RiaStdStringTools.h"
#include <filesystem>
#include <fstream>
#include <iosfwd>
#include <iostream>
@@ -71,6 +72,8 @@ std::vector<RifEclipseKeywordContent> RifEclipseTextFileReader::readKeywordAndVa
std::vector<RifEclipseKeywordContent>
RifEclipseTextFileReader::readKeywordAndValuesMemoryMappedFile( const std::string& filename )
{
if ( !std::filesystem::exists( filename ) ) return {};
mio::mmap_source mmap( filename );
std::error_code error;

View File

@@ -297,7 +297,10 @@ bool RifOpmCommonEclipseSummary::openFileReader( const QString& fileName,
try
{
// The standard reader will import data from SMSPEC and UNSMRY files
m_standardReader = std::make_unique<Opm::EclIO::ESmry>( smspecFileName.toStdString(), includeRestartFiles );
if ( QFile::exists( smspecFileName ) )
{
m_standardReader = std::make_unique<Opm::EclIO::ESmry>( smspecFileName.toStdString(), includeRestartFiles );
}
}
catch ( std::exception& e )
{