Skip to content

Commit 8f89751

Browse files
authored
sum-of-multiples: describe the importance of each test (#1371)
sum-of-multiples 1.4.1 As stated in our guidelines, we want descriptions that tell us why each case is being tested: https://github.com/exercism/problem-specifications#test-data-format-canonical-datajson The canonical data was added in #206 during a time when descriptions were not required. Then, placeholder descriptions were added in aaa47ee and it was acknowledged at the time that these descriptions were purely for *schema* compliance, and not compliance with the guidelines nor a motivation for each case. By examining the issues that led to each case being added, it is possible to understand the descriptions. With more cases being added to sum-of-multiples with clear descriptions, it's time to bring the other descriptions up to speed as well. Original exercise: exercism/exercism@607be68 Additional cases: exercism/exercism#2486 exercism/exercism#2341 exercism/haskell#50 exercism/go#53 #896
1 parent 063b4cf commit 8f89751

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

exercises/sum-of-multiples/canonical-data.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"exercise": "sum-of-multiples",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"cases": [
55
{
6-
"description": "multiples of 3 or 5 up to 1",
6+
"description": "no multiples within limit",
77
"property": "sum",
88
"input": {
99
"factors": [3, 5],
@@ -12,7 +12,7 @@
1212
"expected": 0
1313
},
1414
{
15-
"description": "multiples of 3 or 5 up to 4",
15+
"description": "one factor has multiples within limit",
1616
"property": "sum",
1717
"input": {
1818
"factors": [3, 5],
@@ -21,7 +21,7 @@
2121
"expected": 3
2222
},
2323
{
24-
"description": "multiples of 3 up to 7",
24+
"description": "more than one multiple within limit",
2525
"property": "sum",
2626
"input": {
2727
"factors": [3],
@@ -30,7 +30,7 @@
3030
"expected": 9
3131
},
3232
{
33-
"description": "multiples of 3 or 5 up to 10",
33+
"description": "more than one factor with multiples within limit",
3434
"property": "sum",
3535
"input": {
3636
"factors": [3, 5],
@@ -39,7 +39,7 @@
3939
"expected": 23
4040
},
4141
{
42-
"description": "multiples of 3 or 5 up to 100",
42+
"description": "each multiple is only counted once",
4343
"property": "sum",
4444
"input": {
4545
"factors": [3, 5],
@@ -48,7 +48,7 @@
4848
"expected": 2318
4949
},
5050
{
51-
"description": "multiples of 3 or 5 up to 1000",
51+
"description": "a much larger limit",
5252
"property": "sum",
5353
"input": {
5454
"factors": [3, 5],
@@ -57,7 +57,7 @@
5757
"expected": 233168
5858
},
5959
{
60-
"description": "multiples of 7, 13 or 17 up to 20",
60+
"description": "three factors",
6161
"property": "sum",
6262
"input": {
6363
"factors": [7, 13, 17],
@@ -66,7 +66,7 @@
6666
"expected": 51
6767
},
6868
{
69-
"description": "multiples of 4 or 6 up to 15",
69+
"description": "factors not relatively prime",
7070
"property": "sum",
7171
"input": {
7272
"factors": [4, 6],
@@ -75,7 +75,7 @@
7575
"expected": 30
7676
},
7777
{
78-
"description": "multiples of 5, 6 or 8 up to 150",
78+
"description": "some pairs of factors relatively prime and some not",
7979
"property": "sum",
8080
"input": {
8181
"factors": [5, 6, 8],
@@ -84,7 +84,7 @@
8484
"expected": 4419
8585
},
8686
{
87-
"description": "multiples of 5 or 25 up to 51",
87+
"description": "one factor is a multiple of another",
8888
"property": "sum",
8989
"input": {
9090
"factors": [5, 25],
@@ -93,7 +93,7 @@
9393
"expected": 275
9494
},
9595
{
96-
"description": "multiples of 43 or 47 up to 10000",
96+
"description": "much larger factors",
9797
"property": "sum",
9898
"input": {
9999
"factors": [43, 47],
@@ -102,7 +102,7 @@
102102
"expected": 2203160
103103
},
104104
{
105-
"description": "multiples of 1 up to 100",
105+
"description": "all numbers are multiples of 1",
106106
"property": "sum",
107107
"input": {
108108
"factors": [1],
@@ -111,7 +111,7 @@
111111
"expected": 4950
112112
},
113113
{
114-
"description": "multiples of an empty list up to 10000",
114+
"description": "no factors means an empty sum",
115115
"property": "sum",
116116
"input": {
117117
"factors": [],

0 commit comments

Comments
 (0)