Revision a8e2bfcae1226a51160d202c2c1860680c671d44 authored by garibay-j on 29 November 2021, 13:54:39 UTC, committed by garibay-j on 29 November 2021, 13:54:39 UTC
Draft: [CL] Remove cation exchange and surface complexation exclusivity Closes #3159 See merge request ogs/ogs!3903
TestBoostGmlInterface.cpp
/**
* \file
* \author Karsten Rink
* \date 2016-02-16
*
* \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 <cstdio>
#include "BaseLib/StringTools.h"
#include "GeoLib/GEOObjects.h"
#include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h"
#include "InfoLib/TestInfo.h"
#include "Tests/FileIO/TestGmlInterface.h"
#include "filesystem.h"
TEST_F(TestGmlInterface, BoostXmlGmlWriterReaderTest)
{
// Writer test
std::string test_data_file =
(fs::temp_directory_path() /= BaseLib::randomString(32) + ".gml")
.string();
GeoLib::IO::BoostXmlGmlInterface xml(geo_objects);
xml.export_name = geo_name;
int result =
BaseLib::IO::writeStringToFile(xml.writeToString(), test_data_file);
EXPECT_EQ(result, 1);
// remove the written data from the data structures
geo_objects.removeSurfaceVec(geo_name);
geo_objects.removePolylineVec(geo_name);
geo_objects.removePointVec(geo_name);
// Reader test
result = xml.readFile(test_data_file);
EXPECT_EQ(1, result);
std::remove(test_data_file.c_str());
test_data_file += ".md5";
std::remove(test_data_file.c_str());
checkPointProperties();
checkPolylineProperties();
checkSurfaceProperties();
}
Computing file changes ...