Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync custom-set #1516

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading