mirror of
https://github.com/boostorg/core.git
synced 2025-05-10 15:23:54 +00:00
Test that BOOST_TEST_EQ doesn't emit sign-compare warnings
This commit is contained in:
parent
e94af0d41a
commit
d112d23e9d
@ -75,6 +75,7 @@ run lightweight_test_gt_ge_test.cpp ;
|
|||||||
run lightweight_test_eq_nullptr.cpp ;
|
run lightweight_test_eq_nullptr.cpp ;
|
||||||
run lightweight_test_test3.cpp ;
|
run lightweight_test_test3.cpp ;
|
||||||
run lightweight_test_test4.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_eq_test.cpp ;
|
||||||
run-fail lightweight_test_all_with_fail.cpp ;
|
run-fail lightweight_test_all_with_fail.cpp ;
|
||||||
|
19
test/lightweight_test_test5.cpp
Normal file
19
test/lightweight_test_test5.cpp
Normal 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();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user