Skip to content
Snippets Groups Projects
Commit 932d9ec0 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

+ unit test to cover file io ascii

parent e6bfc705
No related branches found
No related tags found
1 merge request!2837provide unit tests for file2stream and stream2file (#1086)
Pipeline #186205 failed
...@@ -56,6 +56,17 @@ TEST_F(RW2DTest, rwNumpyMatrix) ...@@ -56,6 +56,17 @@ TEST_F(RW2DTest, rwNumpyMatrix)
EXPECT_EQ(m_model_data[i], result[i]); EXPECT_EQ(m_model_data[i], result[i]);
} }
TEST_F(RW2DTest, ascii)
{
const std::string path = testdir / fs::path("rw2dtestdata");
IO::writeDatafield(m_model_data, path);
Datafield result = IO::readData2D(path, IO::csv2D);
EXPECT_EQ(m_model_data.rank(), result.rank());
for (size_t i = 0, size = m_model_data.size(); i < size; ++i)
EXPECT_EQ(m_model_data[i], result[i]);
}
TEST_F(RW2DTest, gz) TEST_F(RW2DTest, gz)
{ {
const std::string path = testdir / fs::path("rw2dtestdata.gz"); const std::string path = testdir / fs::path("rw2dtestdata.gz");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment