From 29586998681ee4c98ba12c81a7e105e003b02899 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sat, 16 Sep 2023 20:39:41 +0200 Subject: [PATCH 1/4] [custom-set] Add test for deduplication motivated by: https://github.com/exercism/rust/issues/1275 --- exercises/custom-set/canonical-data.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/exercises/custom-set/canonical-data.json b/exercises/custom-set/canonical-data.json index 827eab57f8..f91f93079d 100644 --- a/exercises/custom-set/canonical-data.json +++ b/exercises/custom-set/canonical-data.json @@ -251,6 +251,16 @@ "set2": [1, 2, 3, 4] }, "expected": false + }, + { + "uuid": "d4a1142f-09aa-4df9-8b83-4437dcf7ec24", + "description": "set is equal to a set with duplicate elements", + "property": "equal", + "input": { + "set1": [1], + "set2": [1, 1] + }, + "expected": true } ] }, From 9a70870aedea6ad572717e73ec8d50b5271de559 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Wed, 20 Sep 2023 09:05:36 +0200 Subject: [PATCH 2/4] [custom-set] Add tests for duplicates in subsets --- exercises/custom-set/canonical-data.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/exercises/custom-set/canonical-data.json b/exercises/custom-set/canonical-data.json index f91f93079d..c85d4159f6 100644 --- a/exercises/custom-set/canonical-data.json +++ b/exercises/custom-set/canonical-data.json @@ -131,6 +131,26 @@ "set2": [4, 1, 3] }, "expected": false + }, + { + "uuid": "0b95204d-93fa-4b60-9499-1e34f228c336", + "description": "set is a subset of set with duplicates", + "property": "subset", + "input": { + "set1": [1, 2, 3], + "set2": [1, 1, 2, 3] + }, + "expected": true + }, + { + "uuid": "0bb37820-cabf-483f-901c-b278e42e4af9", + "description": "set with duplicates is a subset of set without duplicates", + "property": "subset", + "input": { + "set1": [1, 1, 2, 3], + "set2": [1, 2, 3] + }, + "expected": true } ] }, From 915bf818ab226d0e16c7452fd6981e8684f7fb08 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Wed, 20 Sep 2023 13:59:58 +0200 Subject: [PATCH 3/4] [custom-set] Improve descriptions of duplicate tests --- exercises/custom-set/canonical-data.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/custom-set/canonical-data.json b/exercises/custom-set/canonical-data.json index c85d4159f6..ab16bdabdc 100644 --- a/exercises/custom-set/canonical-data.json +++ b/exercises/custom-set/canonical-data.json @@ -134,7 +134,7 @@ }, { "uuid": "0b95204d-93fa-4b60-9499-1e34f228c336", - "description": "set is a subset of set with duplicates", + "description": "set is a subset of set constructed from array with duplicates", "property": "subset", "input": { "set1": [1, 2, 3], @@ -144,7 +144,7 @@ }, { "uuid": "0bb37820-cabf-483f-901c-b278e42e4af9", - "description": "set with duplicates is a subset of set without duplicates", + "description": "set constructed from array with duplicates is a subset of set", "property": "subset", "input": { "set1": [1, 1, 2, 3], @@ -274,7 +274,7 @@ }, { "uuid": "d4a1142f-09aa-4df9-8b83-4437dcf7ec24", - "description": "set is equal to a set with duplicate elements", + "description": "set is equal to a set constructed from an array with duplicates", "property": "equal", "input": { "set1": [1], From 1a0b53b7e58632cda4dd00b027e7ef3877961b81 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sun, 24 Sep 2023 00:16:57 +0200 Subject: [PATCH 4/4] [custom-set] Remove tests for duplicates in subsets --- exercises/custom-set/canonical-data.json | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/exercises/custom-set/canonical-data.json b/exercises/custom-set/canonical-data.json index ab16bdabdc..b22a38f44a 100644 --- a/exercises/custom-set/canonical-data.json +++ b/exercises/custom-set/canonical-data.json @@ -131,26 +131,6 @@ "set2": [4, 1, 3] }, "expected": false - }, - { - "uuid": "0b95204d-93fa-4b60-9499-1e34f228c336", - "description": "set is a subset of set constructed from array with duplicates", - "property": "subset", - "input": { - "set1": [1, 2, 3], - "set2": [1, 1, 2, 3] - }, - "expected": true - }, - { - "uuid": "0bb37820-cabf-483f-901c-b278e42e4af9", - "description": "set constructed from array with duplicates is a subset of set", - "property": "subset", - "input": { - "set1": [1, 1, 2, 3], - "set2": [1, 2, 3] - }, - "expected": true } ] },