18 std::vector<double> v{1.0, 2.0, 3.0, 4.0};
20 BOOST_TEST(v == const_span, boost::test_tools::per_element());
22 BOOST_TEST(v == mut_span, boost::test_tools::per_element());
29 std::vector<int> v{1, 2, 3, 4};
31 BOOST_TEST(v == const_span, boost::test_tools::per_element());
33 BOOST_TEST(v == mut_span, boost::test_tools::per_element());
40 std::string s =
"hello there";
42 BOOST_TEST(s == std::string(const_span.
data(), const_span.
size()));
49 std::vector<char> s{
'h',
'e',
'l',
'l',
'o',
' ',
't',
'h',
'e',
'r',
'e'};
51 BOOST_CHECK_EQUAL_COLLECTIONS(
53 const_span.
begin(), const_span.
end());
60 std::string s =
"hello there";
63 BOOST_CHECK_EQUAL_COLLECTIONS(s.begin(), ++s.end(),
64 const_span.
begin(), const_span.
end());
71 std::array<char, 11> s{
'h',
'e',
'l',
'l',
'o',
' ',
't',
'h',
'e',
'r',
'e'};
74 BOOST_CHECK_EQUAL_COLLECTIONS(
76 const_span.
begin(), const_span.
end());
83 char s[] =
"hello there";
86 BOOST_CHECK_EQUAL_COLLECTIONS(
88 const_span.
begin(), const_span.
end());
95 std::string s =
"hello there";
98 BOOST_TEST(s == std::string(const_span.
data(), const_span.
size()));
105 std::string s =
"hello there";
106 const std::string &scr = s;
108 BOOST_TEST(s == std::string(const_span.
data(), const_span.
size()));
115 std::string s =
"hello there";
118 BOOST_TEST(s == std::string(const_span.
data(), const_span.
size()));
125 const char *s =
"hello there";
127 BOOST_TEST(s == std::string(const_span.
data(), const_span.
size()));
134 const char *s =
"hello there";
136 std::string_view sv{const_span.
data(), const_span.
size()};
138 BOOST_TEST(s == std::string(const_span.
data(), const_span.
size()));
BOOST_AUTO_TEST_CASE(testIQNIMVJPPWithSubsteps)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
A C++ 11 implementation of the non-owning C++20 std::span type.
constexpr pointer data() const noexcept
constexpr iterator begin() const noexcept
constexpr iterator end() const noexcept
constexpr size_type size() const noexcept