test
test copied to clipboard
Using BOOST_REQUIRE () should not cause "comparison of integers of different" warning
Hi! When I use BOOST_TEST_REQUIRE(==) the compiler generates "comparison of integers of different" warnings, but without BOOST_*() macros everything is compiled silently even with -Wall -Wextra.
#include <vector>
#include <boost/test/unit_test.hpp>
bool foo(std::vector<char>& v) {
BOOST_TEST_REQUIRE(v.size() == 0); // warning: comparison of integers of different signs: 'const unsigned long' and 'const int'
return v.size() == 0; // Okay
}