mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Make to_float more tolerant to spaces.
This commit is contained in:
@@ -306,3 +306,9 @@ fn void tokenize_all_skip_last()
|
||||
}
|
||||
test::eq(str.str_view(), "foo--bar-baz-");
|
||||
}
|
||||
|
||||
fn void test_float()
|
||||
{
|
||||
test::eq_approx(- 2.04632e-05," - 2.04632e-05 ".to_float()!!, delta: 0.00001e-5);
|
||||
test::eq_approx(2.04632e-05," + 2.04632e-05 ".to_float()!!, delta: 0.00001e-5);
|
||||
}
|
||||
Reference in New Issue
Block a user