29 if (callingTag.
getName() ==
"test-double") {
33 if (callingTag.
getName() ==
"test-eigen-1") {
37 if (callingTag.
getName() ==
"test-eigen-2") {
41 if (callingTag.
getName() ==
"test-eigen-3") {
45 if (callingTag.
getName() ==
"test-int") {
49 if (callingTag.
getName() ==
"test-bool") {
53 if (callingTag.
getName() ==
"test-string") {
60 std::ignore = callingTag;
68 std::string filename(getPathToSources() +
"/xml/tests/xmlparser_test.xml");
107 BOOST_TEST(hash ==
"60a732f93a3a52eea0b33582a0ce0e92");
131 std::string filename(getPathToSources() +
"/xml/tests/xmlparser_occtest.xml");
156 BOOST_TEST(hash ==
"b2b2b03b807f5d0d86d77fdb2f07b42f");
163 std::string filename(getPathToSources() +
"/xml/tests/xmlparser_nstest.xml");
180 BOOST_TEST(hash ==
"758805e1fc385a73b929cc75ade90c8c");
202 std::string filename(getPathToSources() +
"/xml/tests/config_xmltest_context.xml");
207 auto hash =
configure(rootTag, ccontext, filename);
208 BOOST_TEST(hash ==
"c63ea663514b5150ae9415d7adbb84cb");
222 BOOST_TEST(
decodeXML(
"Less than < test") ==
"Less than < test");
223 BOOST_TEST(
decodeXML(
"Greater than > test") ==
"Greater than > test");
224 BOOST_TEST(
decodeXML(
"Ampersand & test") ==
"Ampersand & test");
225 BOOST_TEST(
decodeXML(
"Quotation " test") ==
"Quotation \" test");
226 BOOST_TEST(
decodeXML(
"Apostrophe ' test") ==
"Apostrophe ' test");
228 BOOST_TEST(
decodeXML(
"" < > > < & " & '") ==
"\" < > > < & \" & '");
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(AttributeTypeTest)
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Represents an XML tag to be configured automatically.
Eigen::VectorXd getEigenVectorXdAttributeValue(const std::string &name) const
std::string getStringAttributeValue(const std::string &name, std::optional< std::string > default_value=std::nullopt) const
bool getBooleanAttributeValue(const std::string &name, std::optional< bool > default_value=std::nullopt) const
const std::string & getName() const
Returns name (without namespace).
int getIntAttributeValue(const std::string &name, std::optional< int > default_value=std::nullopt) const
XMLTag & addNamespace(const std::string &namespaceName)
Adds a namespace to the tag.
double getDoubleAttributeValue(const std::string &name, std::optional< double > default_value=std::nullopt) const
XMLTag & addAttribute(const XMLAttribute< double > &attribute)
Adds a XML attribute by making a copy of the given attribute.
XMLTag & addSubtag(const XMLTag &tag)
Adds an XML tag as subtag by making a copy of the given tag.
std::string getPathToSources()
Returns the base path to the sources.
contains the XML configuration parser.
std::string decodeXML(std::string_view xml)
Decodes escape sequences of a given xml.
std::string configure(XMLTag &tag, const precice::xml::ConfigurationContext &context, std::string_view configurationFilename)
Configures the given configuration from file configurationFilename.
Main namespace of the precice library.
void xmlTagCallback(const ConfigurationContext &context, XMLTag &callingTag) override
Callback at begin of XML tag.
Eigen::VectorXd eigenValue2
void xmlEndTagCallback(const ConfigurationContext &context, XMLTag &callingTag) override
Callback at end of XML tag and at end of subtag.
Eigen::VectorXd eigenValue1
Eigen::VectorXd eigenValue3
void xmlTagCallback(const ConfigurationContext &context, XMLTag &callingTag) override
Callback at begin of XML tag.
void xmlEndTagCallback(const ConfigurationContext &context, XMLTag &callingTag) override
Callback at end of XML tag and at end of subtag.
ConfigurationContext endContext
ConfigurationContext startContext
Tightly coupled to the parameters of Participant()
Callback interface for configuration classes using XMLTag.