defmodule ATest do
use ExUnit.Case
[{1, 2, 3}, {10, 20, 40}, {100, 200, 300}]
|> Enum.each(fn {a, b, c} ->
test "#{a} + #{b} = #{c}" do
assert unquote(a) + unquote(b) = unquote(c)
end
end)
end
Output:
.
1) test 10 + 20 = 40 (Test.Test)
t...