Files
pplus-library/mojo/probes/string-atof-other.mojo
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

19 lines
402 B
Mojo

# probe: the other texts atof reads or refuses: spaces around a number, underscores, a lone exponent, words, an empty text, inf and nan
def show(t: String):
try:
print(t, "->", atof(t))
except e:
print(t, "-> raised:", e)
def main():
show(" 2.5")
show("2.5 ")
show("1_000")
show("1e")
show("abc")
show("")
show("-")
show("inf")
show("nan")