1
0
forked from boostorg/core

Add missing unsigned short tests to bit_rotate_test

This commit is contained in:
Peter Dimov
2020-12-28 21:54:42 +02:00
parent a47eebf41a
commit 123b567051

View File

@ -133,6 +133,12 @@ int main()
BOOST_TEST_EQ( +boost::core::rotr( x, i ), +x );
}
{
unsigned short x = 0;
BOOST_TEST_EQ( boost::core::rotl( x, i ), x );
BOOST_TEST_EQ( boost::core::rotr( x, i ), x );
}
{
unsigned int x = 0;
BOOST_TEST_EQ( boost::core::rotl( x, i ), x );
@ -159,6 +165,7 @@ int main()
boost::uint64_t x = rng();
test_rotate( static_cast<unsigned char>( x ) );
test_rotate( static_cast<unsigned short>( x ) );
test_rotate( static_cast<unsigned int>( x ) );
test_rotate( static_cast<unsigned long>( x ) );
test_rotate( static_cast<unsigned long long>( x ) );