19 BOOST_TEST_CONTEXT(
"Info is \"" << info <<
"\"")
21 BOOST_TEST(!info.empty(),
"The info contains at least the version.");
23 auto semis =
std::count(info.begin(), info.end(),
';');
24 BOOST_TEST(semis >= 2,
"The info contains " << semis <<
" of at least 3 sections ");
26 auto firstSemi = info.find(
';');
27 auto version = info.substr(0, firstSemi);
28 BOOST_TEST_INFO(
"Section: " << version);
29 BOOST_TEST(!version.empty(),
"The info contains the version section");
31 auto secondSemi = info.find(
';', firstSemi + 1);
32 auto revision = info.substr(firstSemi + 1, secondSemi - firstSemi - 1);
33 BOOST_TEST_INFO(
"Section: " << revision);
34 BOOST_TEST(!revision.empty(),
"The info contains the revision section");
46 BOOST_TEST(PRECICE_VERSION_MAJOR > 0);
47 BOOST_TEST(PRECICE_VERSION_MINOR >= 0);
48 BOOST_TEST(PRECICE_VERSION_PATCH >= 0);
50 BOOST_REQUIRE_NO_THROW(
std::string{PRECICE_VERSION});
54 BOOST_REQUIRE(version.length() >= 5);
56 BOOST_REQUIRE(
std::count(version.begin(), version.end(),
'.') == 2);
63 BOOST_REQUIRE(PRECICE_VERSION_GREATER_EQUAL(0, 0, 0));
64 BOOST_REQUIRE(PRECICE_VERSION_GREATER_EQUAL(1, 0, 0));
65 BOOST_REQUIRE(PRECICE_VERSION_GREATER_EQUAL(1, 1, 1));
68 BOOST_REQUIRE(PRECICE_VERSION_GREATER_EQUAL(
69 PRECICE_VERSION_MAJOR,
70 PRECICE_VERSION_MINOR,
71 PRECICE_VERSION_PATCH));
74 BOOST_REQUIRE(!PRECICE_VERSION_GREATER_EQUAL(99, 9, 99));