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-rawDataReader.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'test/test-rawDataReader.cpp') diff --git a/test/test-rawDataReader.cpp b/test/test-rawDataReader.cpp index 4ac0a8a..b211fe3 100644 --- a/test/test-rawDataReader.cpp +++ b/test/test-rawDataReader.cpp @@ -3,10 +3,20 @@ #include #include +#include "bitset.h" #include "helpers.h" +#include "mariadb_repl.h" +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include using namespace MyGrate; @@ -147,10 +157,10 @@ BOOST_DATA_TEST_CASE(read_field_type, BOOST_AUTO_TEST_CASE(rdr_from_MARIADB_STRING) { - char buf[5] = "test"; - MARIADB_STRING str {buf, strlen(buf)}; + std::string buf {"test"}; + MARIADB_STRING str {buf.data(), buf.length()}; RawDataReader rdr {str}; - BOOST_CHECK_EQUAL(rdr.viewValue(4), "test"); + BOOST_CHECK_EQUAL(rdr.viewValue(buf.length()), buf); } using SimpleTypes = boost::mpl::list