Test that BOOST_TEST_EQ doesn't emit sign-compare warnings

This commit is contained in:
Peter Dimov 2019-10-11 16:02:45 +03:00
parent e94af0d41a
commit d112d23e9d
2 changed files with 20 additions and 0 deletions

View File

@ -75,6 +75,7 @@ run lightweight_test_gt_ge_test.cpp ;
run lightweight_test_eq_nullptr.cpp ;
run lightweight_test_test3.cpp ;
run lightweight_test_test4.cpp ;
run lightweight_test_test5.cpp : : : <warnings>extra <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on ;
run-fail lightweight_test_all_eq_test.cpp ;
run-fail lightweight_test_all_with_fail.cpp ;

View File

@ -0,0 +1,19 @@
//
// Test that BOOST_TEST_EQ doesn't emit sign compare warnings
//
// Copyright 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
//
#include <boost/core/lightweight_test.hpp>
int main()
{
BOOST_TEST_EQ(1, 1u);
BOOST_TEST_EQ(~0u, -1);
return boost::report_errors();
}