Permalink
Browse files

Order of items in set have changed, weird.

  • Loading branch information...
seven1m committed Feb 2, 2014
1 parent 572e99c commit 4aa543a908f70c23e54ad57d59323ecefe5f7b66
Showing with 2 additions and 2 deletions.
  1. +2 −2 25-set.exs
View
@@ -5,12 +5,12 @@ defmodule SetTest do
test "to_list" do
list = HashSet.new([1, 2, 2, 3]) |> HashSet.to_list
- assert list == [1, 2, 3]
+ assert list == [2, 3, 1] # unintuitive ordering
end
test "union" do
union = HashSet.new([1, 2, 3]) |> HashSet.union(HashSet.new([2, 3, 4]))
- assert Set.to_list(union) == [1, 2, 3, 4]
+ assert Set.to_list(union) == [2, 3, 4, 1] # unintuitive, but somewhat more understandable
end
test "intersection" do

0 comments on commit 4aa543a

Please sign in to comment.