mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Estimated hours taken: 0.1 Branches: main tests/general/string_to_float.m: tests/general/string_to_float.exp: Add some additional tests of string_to_float.
18 lines
545 B
Plaintext
18 lines
545 B
Plaintext
string__to_float("1.23") = 1.230000
|
|
string__to_float("x1.23") FAILS
|
|
string__to_float("1.23x") FAILS
|
|
string__to_float("x1.23x") FAILS
|
|
string__to_float(" 1.23") FAILS
|
|
string__to_float("1.23 ") FAILS
|
|
string__to_float(" 1.23 ") FAILS
|
|
string__to_float("1") = 1.000000
|
|
string__to_float("-1") = -1.000000
|
|
string__to_float("+1") = 1.000000
|
|
string__to_float("0") = 0.000000
|
|
string__to_float("+0") = 0.000000
|
|
string__to_float("-0") = -0.000000
|
|
string__to_float("-") FAILS
|
|
string__to_float("+") FAILS
|
|
string__to_float(" ") FAILS
|
|
string__to_float("") FAILS
|