summaryrefslogtreecommitdiff
path: root/test/test-streams.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-streams.cpp')
-rw-r--r--test/test-streams.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/test/test-streams.cpp b/test/test-streams.cpp
index 9e79bd6..3958e36 100644
--- a/test/test-streams.cpp
+++ b/test/test-streams.cpp
@@ -2,7 +2,20 @@
#include <boost/test/data/test_case.hpp>
#include <boost/test/unit_test.hpp>
+#include "bitset.h"
#include "helpers.h"
+#include "mariadb_repl.h"
+#include "mysql_types.h"
+#include <array>
+#include <cstddef>
+#include <ctime>
+#include <iosfwd>
+#include <string>
+#include <string_view>
+#include <tuple>
+#include <vector>
+struct timespec;
+struct tm;
#include <streamSupport.h>
BOOST_FIXTURE_TEST_SUITE(stream, std::stringstream);
@@ -56,7 +69,7 @@ BOOST_DATA_TEST_CASE(tss,
*this << in;
BOOST_CHECK_EQUAL(this->str(), exp);
}
-constexpr std::byte somebits[3] {0x00_b, 0xFF_b, 0xa1_b};
+constexpr std::array<std::byte, 3> somebits {0x00_b, 0xFF_b, 0xa1_b};
BOOST_DATA_TEST_CASE(bss,
boost::unit_test::data::make<ToStream<MyGrate::BitSet>>({
{{MyGrate::BitSet {somebits}}, "[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1]"},
@@ -69,8 +82,8 @@ BOOST_DATA_TEST_CASE(bss,
BOOST_AUTO_TEST_CASE(mariadb_string)
{
- char buf[5] = "test";
- MARIADB_STRING str {buf, strlen(buf)};
+ std::string buf {"test"};
+ MARIADB_STRING str {buf.data(), buf.length()};
*this << str;
BOOST_CHECK_EQUAL(this->str(), buf);
}