preCICE
Loading...
Searching...
No Matches
ExportConfigurationTest.cpp
Go to the documentation of this file.
1#include <list>
5#include "testing/Testing.hpp"
6#include "xml/XMLTag.hpp"
7
9BOOST_AUTO_TEST_SUITE(Configuration)
10
11using namespace precice;
12
15{
17 using xml::XMLTag;
18 XMLTag tag = xml::getRootTag();
20 xml::configure(tag, xml::ConfigurationContext{}, testing::getPathToSources() + "/io/tests/config1.xml");
21 BOOST_TEST(config.exportContexts().size() == 1);
22 const io::ConfiguredExport &econtext = config.exportContexts().front();
23 BOOST_TEST(econtext.type == "vtk");
24 BOOST_TEST(econtext.everyNTimeWindows == 10);
25}
26
29{
31 using xml::XMLTag;
32 XMLTag tag = xml::getRootTag();
34 xml::configure(tag, xml::ConfigurationContext{}, testing::getPathToSources() + "/io/tests/config2.xml");
35 BOOST_TEST(config.exportContexts().size() == 1);
36 const io::ConfiguredExport &econtext = config.exportContexts().front();
37 BOOST_TEST(econtext.type == "vtk");
38 BOOST_TEST(econtext.everyNTimeWindows == 1);
39 BOOST_TEST(econtext.location == "somepath");
40}
41
42BOOST_AUTO_TEST_SUITE_END() // Configuration
BOOST_AUTO_TEST_CASE(testIQNIMVJPPWithSubsteps)
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
Configuration class for exports.
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:34
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