preCICE v3.1.2
Loading...
Searching...
No Matches
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
15{
16 PRECICE_TEST(1_rank);
17 std::string filename(testing::getPathToSources() + "/mesh/tests/data-config.xml");
18 using xml::XMLTag;
19 XMLTag tag = xml::getRootTag();
20 mesh::DataConfiguration dataConfig(tag);
22 BOOST_TEST(dataConfig.data().size() == 3);
23 BOOST_TEST(dataConfig.data().at(0).name == "vector-data");
24 BOOST_TEST(dataConfig.data().at(1).name == "floating-data");
25 BOOST_TEST(dataConfig.data().at(2).name == "second-vector-data");
26}
27
BOOST_AUTO_TEST_CASE(DataConfig)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
Definition Testing.hpp:27
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:31
std::string getPathToSources()
Returns the base path to the sources.
Definition Testing.cpp:31
XMLTag getRootTag()
Returns an XMLTag::Listener that does nothing on callbacks.
Definition XMLTag.cpp:389
void configure(XMLTag &tag, const precice::xml::ConfigurationContext &context, std::string_view configurationFilename)
Configures the given configuration from file configurationFilename.
Definition XMLTag.cpp:395
Main namespace of the precice library.
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:24