mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1312 Initial infrastructure for test
This commit is contained in:
parent
8175ae8efe
commit
8c8de5269f
@ -24,6 +24,7 @@ ${CEE_CURRENT_LIST_DIR}WellPathAsciiFileReader-Test.cpp
|
||||
${CEE_CURRENT_LIST_DIR}opm-parser-Test.cpp
|
||||
${CEE_CURRENT_LIST_DIR}opm-parser-Performance-Test.cpp
|
||||
${CEE_CURRENT_LIST_DIR}opm-flowdiagnostics-Test.cpp
|
||||
${CEE_CURRENT_LIST_DIR}HDF5FileReader-Test.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
46
ApplicationCode/UnitTests/HDF5FileReader-Test.cpp
Normal file
46
ApplicationCode/UnitTests/HDF5FileReader-Test.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "H5Cpp.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/*
|
||||
TEST(RimWellPathAsciiFileReaderTest, TestWellNameNoColon)
|
||||
{
|
||||
QTemporaryFile file;
|
||||
if (file.open())
|
||||
{
|
||||
QString wellName = "My test Wellname";
|
||||
{
|
||||
QTextStream out(&file);
|
||||
out << "name " << wellName << "\n";
|
||||
out << "1 2 3";
|
||||
}
|
||||
|
||||
RifWellPathAsciiFileReader reader;
|
||||
RifWellPathAsciiFileReader::WellData wpData = reader.readWellData(file.fileName(), 0);
|
||||
EXPECT_TRUE(wpData.m_name == wellName);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST(HDFTests, BasicFileRead)
|
||||
{
|
||||
std::string file_path;
|
||||
|
||||
// Check file exists
|
||||
H5::H5File file(file_path, H5F_ACC_RDONLY);
|
||||
H5::Group group = H5::Group(file.openGroup("name"));
|
||||
/*
|
||||
Group group = Group(file.openGroup(GROUP_NAME_FLOW_TRANSPORT));
|
||||
auto dataset_exists = H5Lexists(group.getId(), "GRIDPROPTIME", H5F_ACC_RDONLY);
|
||||
std::vector<std::vector<double>> sgas, soil, swat;
|
||||
*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user