preCICE v3.1.1
Loading...
Searching...
No Matches
ToolingTests.cpp
Go to the documentation of this file.
1#include <sstream>
2#include <string>
3#include "precice/Tooling.hpp"
4#include "testing/Testing.hpp"
5
6BOOST_AUTO_TEST_SUITE(PreciceTests)
8
9BOOST_AUTO_TEST_CASE(MarkdownReference)
10{
11 const std::string ref = [] {
14 return oss.str();
15 }();
16
17 BOOST_TEST(ref.size() > 0);
18 for (const auto &keyword : {"# precice-configuration", "<precice-configuration", "</precice-configuration>", "Example", "Valid Subtags:", "Attribute"}) {
19 BOOST_TEST(ref.find(keyword) != std::string::npos, "The output should include \"" << keyword << '"');
20 }
21}
22
24{
25 const std::string ref = [] {
28 return oss.str();
29 }();
30
31 BOOST_TEST(ref.size() > 0);
32 for (const auto &keyword : {"<!-- TAG precice-configuration", "<!-- TAG mesh", "ATTR name:"}) {
33 BOOST_TEST(ref.find(keyword) != std::string::npos, "The output should include \"" << keyword << '"');
34 }
35}
36
38{
39 const std::string ref = [] {
42 return oss.str();
43 }();
44
45 BOOST_TEST(ref.size() > 0);
46 for (const auto &keyword : {"<!ELEMENT precice-configuration", "<!ATTLIST mesh name"}) {
47 BOOST_TEST(ref.find(keyword) != std::string::npos, "The output should include \"" << keyword << '"');
48 }
49}
50
51BOOST_AUTO_TEST_SUITE(ConfigCheck)
52
54{
55 BOOST_REQUIRE_NO_THROW(
57 precice::testing::getPathToSources() + "/precice/tests/config-checker.xml",
58 "SolverTwo",
59 1));
60}
61
63{
64 BOOST_REQUIRE_NO_THROW(
66 precice::testing::getPathToSources() + "/precice/tests/config-checker.xml",
67 "SolverTwo",
68 4));
69}
70
72
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(MarkdownReference)
std::string getPathToSources()
Returns the base path to the sources.
Definition Testing.cpp:31
void printConfigReference(std::ostream &out, ConfigReferenceType reftype)
Generates a configuration reference.
Definition Tooling.cpp:15
void checkConfiguration(const std::string &filename, const std::string &participant, int size)
Checks a given configuration.
Definition Tooling.cpp:32
@ MD
Markdown version used for the website.
T str(T... args)