An input value 0 for the sr_next_power_of_two() routine is not invalid
any longer. Remove the test case that is expected to fail. Add a regular
case to cover that code path instead.
size_t want_bits;
size_t want_power;
} power_cases[] = {
+ { 0, 1, 1, },
{ 1, 1, 2, },
{ 2, 2, 4, },
{ 3, 2, 4, },
const struct power_case_t *tcase;
int ret;
- ret = sr_next_power_of_two(0, NULL, NULL);
- fail_unless(ret != SR_OK, "invalid value, did not fail");
-
for (case_idx = 0; case_idx < ARRAY_SIZE(power_cases); case_idx++) {
tcase = &power_cases[case_idx];
ret = sr_next_power_of_two(tcase->value, &bits, &power);