1
0
forked from boostorg/core

Update bit_ceil_test.cpp

This commit is contained in:
Peter Dimov
2025-06-06 19:03:11 +03:00
parent 11d367377f
commit 7cb3e689e0

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 );
}
}