1#include <boost/test/tools/interface.hpp>
2#include <boost/test/tools/old/interface.hpp>
21 BOOST_TEST(wrapped ==
std::string(
"123456\n1234567\n12345678"));
23 text =
"1234 1234 1234";
25 BOOST_TEST(wrapped ==
std::string(
"1234\n1234\n1234"));
31 text =
"1234 1234 1234";
33 BOOST_TEST(wrapped ==
std::string(
"1234\n 1234\n 1234"));
35 text =
"1234 1234 1234";
37 BOOST_TEST(wrapped ==
std::string(
"1234\n 1234\n 1234"));
39 text =
"12345678 1234 1 1234";
41 BOOST_TEST(wrapped ==
std::string(
"12345678\n 1234 1\n 1234"));
53 BOOST_TEST(result.
compare(filename + extension) == 0);
55 result = filename + extension;
57 BOOST_TEST(result.
compare(filename + extension) == 0);
59 result = filename + extension +
".zyx";
61 BOOST_TEST(result.
compare(filename + extension +
".zyx" + extension) == 0);
83 BOOST_REQUIRE(sm.
data() !=
nullptr);
84 BOOST_TEST(*sm.
data() ==
'\0');
89 BOOST_TEST(*sm.
data() ==
'1');
92 BOOST_TEST(str.size() == 4);
93 BOOST_TEST(str == cstr);
97 BOOST_TEST(str2.size() == 2);
98 BOOST_TEST(str2 ==
"12");
116 std::set names{
"left",
"right",
"up",
"down"};
118 BOOST_TEST_REQUIRE(matches.size() == 4);
120 BOOST_TEST(matches[0].
name ==
"left");
121 BOOST_TEST(matches[0].
distance == 2);
123 BOOST_TEST(matches[1].
name ==
"down");
124 BOOST_TEST(matches[1].
distance == 3);
126 BOOST_TEST(matches[2].
name ==
"up");
127 BOOST_TEST(matches[2].
distance == 3);
129 BOOST_TEST(matches[3].
name ==
"right");
130 BOOST_TEST(matches[3].
distance == 5);
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(StringWrap)
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Utility class to build a string from C functions with output pointers and static maximum length.
contains precice-related utilities.
std::size_t editDistance(std::string_view s1, std::string_view s2)
bool convertStringToBool(std::string const &value)
Evaluates a string to find out if it represents a bool.
std::string wrapText(const std::string &text, int linewidth, int indentation)
std::string & checkAppendExtension(std::string &filename, const std::string &extension)
Checks if filename has the given extension, if not appends it.
std::vector< StringMatch > computeMatches(std::string_view given, const Container &expected)
Main namespace of the precice library.