diff options
author | Aleksei Magusev <lexmag@me.com> | 2016-09-20 00:57:54 +0200 |
---|---|---|
committer | Aleksei Magusev <lexmag@me.com> | 2016-09-20 00:57:54 +0200 |
commit | 742cb730976ba3739433c7f492f84504f7df6ec8 (patch) | |
tree | 8d83540bd6370ab4c0b8d914542704311fce393e | |
parent | 9796d1684fb2ae9c59bc93a56a59b1ec4e25a365 (diff) | |
download | elixir-742cb730976ba3739433c7f492f84504f7df6ec8.tar.gz |
Tidy up Enum.concat/1,2 tests
-rw-r--r-- | lib/elixir/test/elixir/enum_test.exs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/elixir/test/elixir/enum_test.exs b/lib/elixir/test/elixir/enum_test.exs index 3c0a2a5ae..388a56ef1 100644 --- a/lib/elixir/test/elixir/enum_test.exs +++ b/lib/elixir/test/elixir/enum_test.exs @@ -72,22 +72,16 @@ defmodule EnumTest do assert Enum.concat([[], []]) == [] assert Enum.concat([[]]) == [] assert Enum.concat([]) == [] - - assert Enum.concat([1..5, fn acc, _ -> acc end, [1]]) == [1, 2, 3, 4, 5, 1] end test "concat/2" do assert Enum.concat([], [1]) == [1] assert Enum.concat([1, [2], 3], [4, 5]) == [1, [2], 3, 4, 5] - assert Enum.concat(1..3, 4..5) == [1, 2, 3, 4, 5] - - assert Enum.concat(1..3, [4, 5]) == [1, 2, 3, 4, 5] assert Enum.concat([1, 2], 3..5) == [1, 2, 3, 4, 5] assert Enum.concat([], []) == [] assert Enum.concat([], 1..3) == [1, 2, 3] - assert Enum.concat(1..3, []) == [1, 2, 3] assert Enum.concat(fn acc, _ -> acc end, [1]) == [1] end @@ -811,12 +805,15 @@ defmodule EnumTest.Range do end test "concat/1" do - assert Enum.concat(1..3, []) == [1, 2, 3] - assert Enum.concat(1..3, 0..0) == [1, 2, 3, 0] + assert Enum.concat([1..2, 4..6]) == [1, 2, 4, 5, 6] + assert Enum.concat([1..5, fn acc, _ -> acc end, [1]]) == [1, 2, 3, 4, 5, 1] end test "concat/2" do assert Enum.concat(1..3, 4..5) == [1, 2, 3, 4, 5] + assert Enum.concat(1..3, [4, 5]) == [1, 2, 3, 4, 5] + assert Enum.concat(1..3, []) == [1, 2, 3] + assert Enum.concat(1..3, 0..0) == [1, 2, 3, 0] end test "count/1" do |