Update Float.parse example to actually parse a float
This commit is contained in:
@@ -44,7 +44,7 @@ defmodule Numbers do
|
|||||||
end
|
end
|
||||||
|
|
||||||
koan "Hmm, I want to parse this but it has some strings" do
|
koan "Hmm, I want to parse this but it has some strings" do
|
||||||
assert Float.parse("1 million dollars") == {___, " million dollars"}
|
assert Float.parse("1.5 million dollars") == {___, " million dollars"}
|
||||||
end
|
end
|
||||||
|
|
||||||
koan "I don't want this decimal point, let's round up" do
|
koan "I don't want this decimal point, let's round up" do
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ defmodule NumbersTests do
|
|||||||
"1234",
|
"1234",
|
||||||
42,
|
42,
|
||||||
34.5,
|
34.5,
|
||||||
1.0,
|
1.5,
|
||||||
35.0,
|
35.0,
|
||||||
34.3,
|
34.3,
|
||||||
99.0,
|
99.0,
|
||||||
|
|||||||
Reference in New Issue
Block a user