From 686766929a659e611adea47d8368a691136b0336 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 12 Dec 2020 01:36:22 +0000 Subject: Simple Math tests Calling `assert` within the `Enum.map` makes the errors more usable. --- assessments/semiprimes/server/test/math_test.exs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'assessments/semiprimes') 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 -- cgit 1.4.1