preCICE v3.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DataConfigurationTest.cpp
Go to the documentation of this file.
1#include <memory>
2#include <string>
3#include <vector>
4#include "logging/Logger.hpp"
7#include "testing/Testing.hpp"
8#include "xml/XMLTag.hpp"
9
10using namespace precice;
11
12BOOST_AUTO_TEST_SUITE(MeshTests)
13
16{
18 std::string filename(testing::getPathToSources() + "/mesh/tests/data-config.xml");
19 using xml::XMLTag;
20 XMLTag tag = xml::getRootTag();
21 mesh::DataConfiguration dataConfig(tag);
23 BOOST_TEST(dataConfig.data().size() == 3);
24 BOOST_TEST(dataConfig.data().at(0).name == "vector-data");
25 BOOST_TEST(dataConfig.data().at(1).name == "floating-data");
26 BOOST_TEST(dataConfig.data().at(2).name == "second-vector-data");
27}
28
BOOST_AUTO_TEST_CASE(DataConfig)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST()
Definition Testing.hpp:39
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Definition Testing.hpp:29
Performs and provides configuration for Data objects from XML files.
const std::vector< ConfiguredData > & data() const
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:28
std::string getPathToSources()
Returns the base path to the sources.
Definition Testing.cpp:33
XMLTag getRootTag()
Returns an empty root tag with name "configuration".
Definition XMLTag.cpp:278
std::string configure(XMLTag &tag, const precice::xml::ConfigurationContext &context, std::string_view configurationFilename)
Configures the given configuration from file configurationFilename.
Definition XMLTag.cpp:284
Main namespace of the precice library.
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:21