fix: update parse_float test to reflect accepted negatives

This commit is contained in:
lohhiiccc 2026-03-29 15:28:54 +02:00
parent 5f0f989e98
commit 40d27b6a9f

View file

@ -39,13 +39,14 @@ Test(parse_float, empty_string)
cr_assert_eq(ret, 1);
}
/* Test 5: Negative number */
/* Test 5: Negative number (cli_parse_float accepts negatives; use cli_parse_ufloat to reject) */
Test(parse_float, negative_number)
{
float result;
int ret = cli_parse_float("-42", &result);
cr_assert_eq(ret, 1);
cr_assert_eq(ret, 0);
cr_assert_float_eq(result, -42.0f, 0.0001f);
}
/* Test 6: Invalid characters */