fix: update parse_float test to reflect accepted negatives
This commit is contained in:
parent
5f0f989e98
commit
40d27b6a9f
1 changed files with 4 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue