From 2317b4608821b03da0cc288d06b9c0bdb6b60239 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 22 May 2021 16:42:06 +0100 Subject: Pass linter checks Except IWYU, doesn't like the C++20 CTF. --- test/test-streams.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'test/test-streams.cpp') 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 #include +#include "bitset.h" #include "helpers.h" +#include "mariadb_repl.h" +#include "mysql_types.h" +#include +#include +#include +#include +#include +#include +#include +#include +struct timespec; +struct tm; #include 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 somebits {0x00_b, 0xFF_b, 0xa1_b}; BOOST_DATA_TEST_CASE(bss, boost::unit_test::data::make>({ {{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); } -- cgit v1.2.3