Skip to content

Commit

Permalink
Sync custom-set (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelikatyborska authored Aug 28, 2024
1 parent 2a86c3d commit f8a4428
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exercises/practice/custom-set/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ description = "Difference (or Complement) of a set is a set of all elements that
[c5ac673e-d707-4db5-8d69-7082c3a5437e]
description = "Difference (or Complement) of a set is a set of all elements that are only in the first set -> difference of two non-empty sets is a set of elements that are only in the first set"

[20d0a38f-7bb7-4c4a-ac15-90c7392ecf2b]
description = "Difference (or Complement) of a set is a set of all elements that are only in the first set -> difference removes all duplicates in the first set"

[c45aed16-5494-455a-9033-5d4c93589dc6]
description = "Union returns a set of all elements in either set -> union of empty sets is an empty set"

Expand Down
9 changes: 9 additions & 0 deletions exercises/practice/custom-set/test/custom_set_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ defmodule CustomSetTest do
expected = CustomSet.new([1, 3])
assert CustomSet.equal?(actual, expected)
end

@tag :pending
test "difference removes all duplicates in the first set" do
custom_set_1 = CustomSet.new([1, 1])
custom_set_2 = CustomSet.new([1])
actual = CustomSet.difference(custom_set_1, custom_set_2)
expected = CustomSet.new([])
assert CustomSet.equal?(actual, expected)
end
end

describe "union" do
Expand Down

0 comments on commit f8a4428

Please sign in to comment.