about summary refs log tree commit diff
path: root/assessments
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-12-12T01·36+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-12-12T01·36+0000
commit686766929a659e611adea47d8368a691136b0336 (patch)
tree21811a0705bb8cb8f0da2cc2e1cb5066c3de1cae /assessments
parentee96a818e104cad7c60947a905d0799c4dc13905 (diff)
Simple Math tests
Calling `assert` within the `Enum.map` makes the errors more usable.
Diffstat (limited to 'assessments')
-rw-r--r--assessments/semiprimes/server/test/math_test.exs4
1 files changed, 1 insertions, 3 deletions
diff --git a/assessments/semiprimes/server/test/math_test.exs b/assessments/semiprimes/server/test/math_test.exs
index 81c60e40667e..c7186c824a8c 100644
--- a/assessments/semiprimes/server/test/math_test.exs
+++ b/assessments/semiprimes/server/test/math_test.exs
@@ -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