Simple Math tests
Calling `assert` within the `Enum.map` makes the errors more usable.
This commit is contained in:
parent
ee96a818e1
commit
686766929a
1 changed files with 1 additions and 3 deletions
|
@ -11,10 +11,8 @@ defmodule MathTest do
|
|||
{21, [3, 7]}
|
||||
]
|
||||
|> Enum.map(fn {input, expected} ->
|
||||
Math.factor(input) == expected
|
||||
assert Math.factor(input) == expected
|
||||
end)
|
||||
|> Enum.all?()
|
||||
|> assert
|
||||
end
|
||||
|
||||
test "handles large numbers" do
|
||||
|
|
Loading…
Reference in a new issue