Nuke warnings in tests

This commit is contained in:
Nils O. Selåsdal
2025-07-18 22:45:08 +02:00
parent cfe647f85d
commit 5b5ca445e9
11 changed files with 230 additions and 230 deletions
+12 -12
View File
@@ -9,7 +9,7 @@ START_TEST (test_bitvec_1)
size_t i;
for (i = 0; i < sizeof s * 8; i++)
fail_if(uc_bv_get_bit(&v, i), "bit %zu is not 0", i);
ck_assert_int_eq(uc_bv_get_bit(&v, i), 0);
}
END_TEST
@@ -23,7 +23,7 @@ START_TEST (test_bitvec_2)
uc_bv_set_bit(&v, i);
for (i = 0; i < sizeof s * 8; i++)
fail_if(uc_bv_get_bit(&v, i) != 1 , "bit %zu is not 1", i);
ck_assert_int_eq(uc_bv_get_bit(&v, i), 1);
}
END_TEST
@@ -34,13 +34,13 @@ START_TEST (test_bitvec_clearbit)
size_t i;
for (i = 0; i < sizeof(uc_bv_integer) * 8; i++)
fail_if(uc_bv_get_bit(&v, i) != 1 , "bit %zu is not 1", i);
ck_assert_int_eq(uc_bv_get_bit(&v, i), 1);
for (i = 0; i < sizeof(uc_bv_integer) * 8; i++)
uc_bv_clr_bit(&v, i);
for (i = 0; i < sizeof(uc_bv_integer) * 8; i++)
fail_if(uc_bv_get_bit(&v, i) != 0 , "bit %zu is not 0", i);
ck_assert_int_eq(uc_bv_get_bit(&v, i), 0);
}
END_TEST
@@ -48,14 +48,14 @@ END_TEST
START_TEST (test_bitvec_set_bits_from_array)
{
struct UCBitVec *v = uc_bv_new(5);
char a[] = {1, 0,1 ,0, 1};
char a[] = {1, 0, 1 ,0, 1};
uc_bv_set_bits_from_array(v,a , 5);
fail_if(uc_bv_get_bit(v, 0) != 1 , "bit 0 is wrong");
fail_if(uc_bv_get_bit(v, 1) != 0 , "bit 1 is wrong");
fail_if(uc_bv_get_bit(v, 2) != 1 , "bit 2 is wrong");
fail_if(uc_bv_get_bit(v, 3) != 0 , "bit 3 is wrong");
fail_if(uc_bv_get_bit(v, 4) != 1 , "bit 4 is wrong");
ck_assert_int_eq(uc_bv_get_bit(v, 0), 1);
ck_assert_int_eq(uc_bv_get_bit(v, 1), 0);
ck_assert_int_eq(uc_bv_get_bit(v, 2), 1);
ck_assert_int_eq(uc_bv_get_bit(v, 3), 0);
ck_assert_int_eq(uc_bv_get_bit(v, 4), 1);
uc_bv_free(v);
}
@@ -70,12 +70,12 @@ START_TEST (test_bitvec_setall_clearall)
uc_bv_set_all(v);
for (i = 0; i < 511; i++)
fail_if(uc_bv_get_bit(v, i) != 1 , "bit %zu is not 1", i);
ck_assert_int_eq(uc_bv_get_bit(v, i), 1);
uc_bv_clr_all(v);
for (i = 0; i < sizeof(uc_bv_integer) * 8; i++)
fail_if(uc_bv_get_bit(v, i) != 0 , "bit %zu is not 0", i);
ck_assert_int_eq(uc_bv_get_bit(v, i), 0);
uc_bv_free(v);