https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 2553cf5f1f6b48583fb2c533d1a2b658cd4b9220 authored by Norbert Grunwald on 17 August 2021, 11:47:44 UTC
[T/TH2M] Analytical solution of confined cube compression
Tip revision: 2553cf5
TestReadStringListFromFile.cpp
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 */

#include <gtest/gtest.h>

#include <string>
#include <vector>

#include "BaseLib/IO/readStringListFromFile.h"
#include "InfoLib/TestInfo.h"

TEST(BaseLibReadStringListFromFile, testreader)
{
    std::string const filename = TestInfoLib::TestInfo::data_path +
                                 "/MeshGeoToolsLib/Ammer/AmmerLayers.txt";
    auto const list = BaseLib::IO::readStringListFromFile(filename);
    ASSERT_EQ(4, list.size());
    for (std::size_t i = 0; i < list.size(); ++i)
    {
        ASSERT_EQ(std::string("layer" + std::to_string(i) + ".vtu"), list[i]);
    }
}
back to top