From 3be7818d5c366b887e4c61964ae87f6d52de0659 Mon Sep 17 00:00:00 2001 From: Hannes Rantzsch Date: Mon, 29 Apr 2019 11:20:31 +0200 Subject: review: unit tests and public api version --- src/tests/unit_asio_stream.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/tests') diff --git a/src/tests/unit_asio_stream.cpp b/src/tests/unit_asio_stream.cpp index 704c4f305..ee80cdba4 100644 --- a/src/tests/unit_asio_stream.cpp +++ b/src/tests/unit_asio_stream.cpp @@ -10,13 +10,13 @@ #if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) +#include +#include + // first boost version to include boost/beast/experimental/test/stream.hpp #include #if BOOST_VERSION >= 106800 -#include -#include - #include #include @@ -133,7 +133,10 @@ class Asio_Stream_Tests final : public Test // use memcmp to check if the data in a is a prefix of the data in b bool contains(const void* a, const void* b, const std::size_t size) { return memcmp(a, b, size) == 0; } - boost::string_view test_data() const { return boost::string_view((const char*)TEST_DATA, TEST_DATA_SIZE); } + boost::string_view test_data() const + { + return boost::string_view(reinterpret_cast(TEST_DATA), TEST_DATA_SIZE); + } void test_sync_handshake(std::vector& results) { @@ -764,7 +767,7 @@ class Asio_Stream_Tests final : public Test } }; -BOTAN_REGISTER_TEST("asio_stream", Asio_Stream_Tests); +BOTAN_REGISTER_TEST("tls_asio_stream", Asio_Stream_Tests); } // namespace Botan_Tests -- cgit v1.2.3