Update bit_ceil_test.cpp

This commit is contained in:
Peter Dimov committed 2025-06-06 19:03:11 +03:00
1 parent 11d367377f
commit 7cb3e689e0
1 file changed
+3 -2
+3 -2
View File
@@ -19,14 +19,15 @@ template<class T> void test_bit_ceil( T x )
T y = boost::core::bit_ceil( x );
BOOST_TEST( boost::core::has_single_bit( y ) );
BOOST_TEST_GE( +y, +x );
if( x == 0 )
{
BOOST_TEST_EQ( y, 1 );
}
else
{
BOOST_TEST( boost::core::has_single_bit( y ) );
BOOST_TEST_GE( +y, +x );
BOOST_TEST_LT( y >> 1, +x );
}
}