From 264f98f32a3c8052759eb856e374f6a10ddb557a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 8 Dec 2019 20:52:55 +0200 Subject: [PATCH] Add extra to all tests, -Wshadow to gcc --- test/Jamfile.v2 | 14 ++++++++++---- test/assert_msg_test2.cpp | 4 ++++ test/assert_test2.cpp | 4 ++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index b833fef..bf0f5f8 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,14 +1,20 @@ # Boost.Assert Library test Jamfile # -# Copyright (c) 2014, 2017 Peter Dimov +# Copyright (c) 2014, 2017, 2019 Peter Dimov # # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt -# bring in rules for testing import testing ; +project : requirements + extra + msvc:on + clang:on + gcc:on + gcc:-Wshadow ; + run assert_test.cpp ; run current_function_test.cpp : : : always_show_run_output ; @@ -29,6 +35,6 @@ run quick.cpp ; run current_function_test2.cpp ; run source_location_test.cpp - : : : extra on ; + : : : gcc-4.4.7:off ; run source_location_test2.cpp - : : : extra on ; + : : : gcc-4.4.7:off ; diff --git a/test/assert_msg_test2.cpp b/test/assert_msg_test2.cpp index 9d8f8da..f079e15 100644 --- a/test/assert_msg_test2.cpp +++ b/test/assert_msg_test2.cpp @@ -43,6 +43,8 @@ void test_default_ndebug() BOOST_ASSERT_MSG( 0, "msg" ); BOOST_ASSERT_MSG( !x, "msg" ); BOOST_ASSERT_MSG( x == 0, "msg" ); + + (void)x; } // BOOST_ENABLE_ASSERT_DEBUG_HANDLER, !NDEBUG @@ -99,6 +101,8 @@ void test_debug_handler_ndebug() BOOST_ASSERT_MSG( x == 0, "msg" ); BOOST_TEST( handler_invoked == 0 ); + + (void)x; } #undef BOOST_ENABLE_ASSERT_DEBUG_HANDLER diff --git a/test/assert_test2.cpp b/test/assert_test2.cpp index 5a8a37f..9879ecb 100644 --- a/test/assert_test2.cpp +++ b/test/assert_test2.cpp @@ -43,6 +43,8 @@ void test_default_ndebug() BOOST_ASSERT( 0 ); BOOST_ASSERT( !x ); BOOST_ASSERT( x == 0 ); + + (void)x; } // BOOST_ENABLE_ASSERT_DEBUG_HANDLER, !NDEBUG @@ -99,6 +101,8 @@ void test_debug_handler_ndebug() BOOST_ASSERT( x == 0 ); BOOST_TEST( handler_invoked == 0 ); + + (void)x; } #undef BOOST_ENABLE_ASSERT_DEBUG_HANDLER