Skip to content

Commit

Permalink
Make tests match instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Oct 3, 2023
1 parent 2f0f93f commit 290b639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion exercises/concept/gotta-snatch-em-all/.meta/example.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ pub fn trade_card(
collection: Set(String),
) -> #(Bool, Set(String)) {
let possible = set.contains(collection, my_card)
let worthwhile = !set.contains(collection, their_card)
let collection =
collection
|> set.delete(my_card)
|> set.insert(their_card)
#(possible, collection)
#(possible && worthwhile, collection)
}

pub fn boring_cards(collections: List(Set(String))) -> List(String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub fn trade_card_trading_a_card_i_have_for_a_card_i_have_test() {
"Gyros",
set.from_list(["Charilord", "Gyros"]),
)
|> should.equal(#(True, set.from_list(["Gyros"])))
|> should.equal(#(False, set.from_list(["Gyros"])))
}

pub fn trade_card_trading_a_card_i_have_for_a_card_i_dont_have_test() {
Expand Down

0 comments on commit 290b639

Please sign in to comment.