Add new koans for comprehensions

Added to partially complete the "Koans for special forms" issue.
https://github.com/elixirkoans/elixir-koans/issues/53
This commit is contained in:
Shannon Oram
2018-08-11 11:18:24 +10:00
parent 554ad1c68a
commit 10847816d0
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
defmodule ComprehensionsTests do
use ExUnit.Case
import TestHarness
test "Comprehensions" do
answers = [
[1, 4, 9, 16],
[1, 4, 9, 16],
["Hello World", "Apple Pie"],
["2 dogs", "2 cats", "4 dogs", "4 cats"],
[4, 5, 6],
["Apple Pie", "Pecan Pie", "Pumpkin Pie"],
]
test_all(Comprehensions, answers)
end
end