From 50bb87d4cc60c0f2272047f46bfe8137e5766406 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 30 Oct 2023 11:42:45 +0100 Subject: [PATCH] Macro name conflict fixes --- test/unit/test/sansio/algo_runner.cpp | 47 +++++++++++++-------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/test/unit/test/sansio/algo_runner.cpp b/test/unit/test/sansio/algo_runner.cpp index 1e5a3e810..7d49120de 100644 --- a/test/unit/test/sansio/algo_runner.cpp +++ b/test/unit/test/sansio/algo_runner.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -63,14 +62,14 @@ BOOST_AUTO_TEST_CASE(read_cached) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return read(seqnum); + BOOST_ASIO_CORO_YIELD return read(seqnum); BOOST_TEST(ec == error_code()); BOOST_TEST(seqnum == 1u); BOOST_MYSQL_ASSERT_BUFFER_EQUALS(st_->reader.message(), msg1); - yield return read(seqnum); + BOOST_ASIO_CORO_YIELD return read(seqnum); BOOST_TEST(ec == error_code()); BOOST_TEST(seqnum == 2u); BOOST_MYSQL_ASSERT_BUFFER_EQUALS(st_->reader.message(), msg2); @@ -110,10 +109,10 @@ BOOST_AUTO_TEST_CASE(read_short_and_buffer_resizing) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return read(seqnum); + BOOST_ASIO_CORO_YIELD return read(seqnum); BOOST_TEST(ec == error_code()); BOOST_TEST(seqnum == 1u); BOOST_MYSQL_ASSERT_BUFFER_EQUALS(st_->reader.message(), msg2); @@ -163,10 +162,10 @@ BOOST_AUTO_TEST_CASE(read_parsing_error) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return read(seqnum); + BOOST_ASIO_CORO_YIELD return read(seqnum); BOOST_TEST(ec == error_code(client_errc::sequence_number_mismatch)); } return next_action(); @@ -201,10 +200,10 @@ BOOST_AUTO_TEST_CASE(read_io_error) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return read(seqnum); + BOOST_ASIO_CORO_YIELD return read(seqnum); BOOST_TEST(ec == error_code(client_errc::wrong_num_params)); } return next_action(); @@ -265,10 +264,10 @@ BOOST_AUTO_TEST_CASE(write_short) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return write(mock_message{msg1}, seqnum); + BOOST_ASIO_CORO_YIELD return write(mock_message{msg1}, seqnum); BOOST_TEST(ec == error_code()); BOOST_TEST(seqnum == 1u); } @@ -307,10 +306,10 @@ BOOST_AUTO_TEST_CASE(write_io_error) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return write(mock_message{msg1}, seqnum); + BOOST_ASIO_CORO_YIELD return write(mock_message{msg1}, seqnum); BOOST_TEST(ec == error_code(client_errc::wrong_num_params)); } return next_action(); @@ -367,10 +366,10 @@ BOOST_AUTO_TEST_CASE(ssl_handshake) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return next_action::ssl_handshake(); + BOOST_ASIO_CORO_YIELD return next_action::ssl_handshake(); BOOST_TEST(ec == error_code(client_errc::wrong_num_params)); } return next_action(); @@ -402,10 +401,10 @@ BOOST_AUTO_TEST_CASE(ssl_shutdown) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return next_action::ssl_shutdown(); + BOOST_ASIO_CORO_YIELD return next_action::ssl_shutdown(); BOOST_TEST(ec == error_code(client_errc::wrong_num_params)); } return next_action(); @@ -438,10 +437,10 @@ BOOST_AUTO_TEST_CASE(connect) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return next_action::connect(&connect_arg); + BOOST_ASIO_CORO_YIELD return next_action::connect(&connect_arg); BOOST_TEST(ec == error_code(client_errc::wrong_num_params)); } return next_action(); @@ -474,10 +473,10 @@ BOOST_AUTO_TEST_CASE(close) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return next_action::close(); + BOOST_ASIO_CORO_YIELD return next_action::close(); BOOST_TEST(ec == error_code(client_errc::wrong_num_params)); } return next_action(); @@ -509,10 +508,10 @@ BOOST_AUTO_TEST_CASE(immediate_completion) next_action resume(error_code ec) { - reenter(coro) + BOOST_ASIO_CORO_REENTER(coro) { BOOST_TEST(ec == error_code()); - yield return next_action(); + BOOST_ASIO_CORO_YIELD return next_action(); BOOST_TEST(false); // Should never be called again after next_action() is returned } return next_action();