From 25d8f7426e80e0dc849210db2effac8dccc19c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anarthal=20=28Rub=C3=A9n=20P=C3=A9rez=29?= <34971811+anarthal@users.noreply.github.com> Date: Fri, 24 Jan 2025 15:44:16 +0100 Subject: [PATCH] test_pos_map/reset_nonempty no longer triggers an assertion Disabled warnings-as-errors for examples that use Boost.Context close #403 --- example/Jamfile | 7 ++++++- test/unit/test/detail/typing/pos_map.cpp | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/example/Jamfile b/example/Jamfile index 96422adfa..03535679e 100644 --- a/example/Jamfile +++ b/example/Jamfile @@ -71,7 +71,10 @@ run_example deletes : 2_simple/deletes.cpp run_example callbacks : 2_simple/callbacks.cpp : $(regular_args) ; run_example coroutines_cpp11 : 2_simple/coroutines_cpp11.cpp /boost/mysql/test//boost_context_lib - : $(regular_args) ; + : $(regular_args) : : + # TODO: remove when https://github.com/boostorg/context/issues/284 is fixed + off +; run_example batch_inserts : 2_simple/batch_inserts.cpp /boost/mysql/test//boost_json_lib : $(hostname) : run_batch_inserts.py ; run_example batch_inserts_generic : 2_simple/batch_inserts_generic.cpp /boost/mysql/test//boost_json_lib @@ -119,4 +122,6 @@ run_example connection_pool : # Uses heavily Boost.Context coroutines, which aren't fully supported by asan norecover:no enable:no + # TODO: remove when https://github.com/boostorg/context/issues/284 is fixed + off ; diff --git a/test/unit/test/detail/typing/pos_map.cpp b/test/unit/test/detail/typing/pos_map.cpp index 45bfdcaae..d93933fca 100644 --- a/test/unit/test/detail/typing/pos_map.cpp +++ b/test/unit/test/detail/typing/pos_map.cpp @@ -28,7 +28,7 @@ using boost::mysql::detail::pos_absent; using boost::mysql::detail::pos_map_add_field; using boost::mysql::detail::pos_map_reset; -BOOST_AUTO_TEST_SUITE(test_post_map) +BOOST_AUTO_TEST_SUITE(test_pos_map) BOOST_AUTO_TEST_CASE(reset_empty) { @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(reset_nonempty) BOOST_TEST(map[0] == pos_absent); BOOST_TEST(map[1] == pos_absent); BOOST_TEST(map[2] == pos_absent); - BOOST_TEST(map[3] == 45u); // didn't modify any extra storage + BOOST_TEST(storage[3] == 45u); // didn't modify any extra storage } BOOST_AUTO_TEST_CASE(add_field_empty)