shiftTooManyBitsSigned

This commit is contained in:
gtsoul-tech 2024-04-24 11:13:28 +03:00
parent e6c884358e
commit adda613f51
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ u32 our_clzll(u64a x) {
TEST(BitUtils, findAndClearLSB32_1) {
// test that it can find every single-bit case
for (unsigned int i = 0; i < 32; i++) {
u32 input = 1 << i;
u32 input = 1U << i;
u32 idx = findAndClearLSB_32(&input);
EXPECT_EQ(i, idx);
EXPECT_EQ(0U, input);
@ -112,7 +112,7 @@ TEST(BitUtils, findAndClearLSB64_2) {
TEST(BitUtils, findAndClearMSB32_1) {
// test that it can find every single-bit case
for (unsigned int i = 0; i < 32; i++) {
u32 input = 1 << i;
u32 input = 1U << i;
u32 idx = findAndClearMSB_32(&input);
EXPECT_EQ(i, idx);
EXPECT_EQ(0U, input);

View File

@ -508,7 +508,7 @@ TEST(SuperVectorUtilsTest,Movemask256c){
u8 vec2[32] = {0};
u32 r = rand() % 100 + 1;
for(int i=0; i<32; i++) {
if (r & (1 << i)) {
if (r & (1U << i)) {
vec[i] = 0xff;
}
}