Skip to content

Commit

Permalink
test_pos_map/reset_nonempty no longer triggers an assertion
Browse files Browse the repository at this point in the history
Disabled warnings-as-errors for examples that use Boost.Context

close #403
  • Loading branch information
anarthal authored Jan 24, 2025
1 parent 1c67537 commit 25d8f74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion example/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
<warnings-as-errors>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
Expand Down Expand Up @@ -119,4 +122,6 @@ run_example connection_pool :
# Uses heavily Boost.Context coroutines, which aren't fully supported by asan
<address-sanitizer>norecover:<build>no
<address-sanitizer>enable:<build>no
# TODO: remove when https://github.com/boostorg/context/issues/284 is fixed
<warnings-as-errors>off
;
4 changes: 2 additions & 2 deletions test/unit/test/detail/typing/pos_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit 25d8f74

Please sign in to comment.