Skip to content

Commit

Permalink
sum-of-multiples: describe the importance of each test (#1371)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
petertseng authored Oct 16, 2018
1 parent 063b4cf commit 8f89751
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions exercises/sum-of-multiples/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"exercise": "sum-of-multiples",
"version": "1.4.0",
"version": "1.4.1",
"cases": [
{
"description": "multiples of 3 or 5 up to 1",
"description": "no multiples within limit",
"property": "sum",
"input": {
"factors": [3, 5],
Expand All @@ -12,7 +12,7 @@
"expected": 0
},
{
"description": "multiples of 3 or 5 up to 4",
"description": "one factor has multiples within limit",
"property": "sum",
"input": {
"factors": [3, 5],
Expand All @@ -21,7 +21,7 @@
"expected": 3
},
{
"description": "multiples of 3 up to 7",
"description": "more than one multiple within limit",
"property": "sum",
"input": {
"factors": [3],
Expand All @@ -30,7 +30,7 @@
"expected": 9
},
{
"description": "multiples of 3 or 5 up to 10",
"description": "more than one factor with multiples within limit",
"property": "sum",
"input": {
"factors": [3, 5],
Expand All @@ -39,7 +39,7 @@
"expected": 23
},
{
"description": "multiples of 3 or 5 up to 100",
"description": "each multiple is only counted once",
"property": "sum",
"input": {
"factors": [3, 5],
Expand All @@ -48,7 +48,7 @@
"expected": 2318
},
{
"description": "multiples of 3 or 5 up to 1000",
"description": "a much larger limit",
"property": "sum",
"input": {
"factors": [3, 5],
Expand All @@ -57,7 +57,7 @@
"expected": 233168
},
{
"description": "multiples of 7, 13 or 17 up to 20",
"description": "three factors",
"property": "sum",
"input": {
"factors": [7, 13, 17],
Expand All @@ -66,7 +66,7 @@
"expected": 51
},
{
"description": "multiples of 4 or 6 up to 15",
"description": "factors not relatively prime",
"property": "sum",
"input": {
"factors": [4, 6],
Expand All @@ -75,7 +75,7 @@
"expected": 30
},
{
"description": "multiples of 5, 6 or 8 up to 150",
"description": "some pairs of factors relatively prime and some not",
"property": "sum",
"input": {
"factors": [5, 6, 8],
Expand All @@ -84,7 +84,7 @@
"expected": 4419
},
{
"description": "multiples of 5 or 25 up to 51",
"description": "one factor is a multiple of another",
"property": "sum",
"input": {
"factors": [5, 25],
Expand All @@ -93,7 +93,7 @@
"expected": 275
},
{
"description": "multiples of 43 or 47 up to 10000",
"description": "much larger factors",
"property": "sum",
"input": {
"factors": [43, 47],
Expand All @@ -102,7 +102,7 @@
"expected": 2203160
},
{
"description": "multiples of 1 up to 100",
"description": "all numbers are multiples of 1",
"property": "sum",
"input": {
"factors": [1],
Expand All @@ -111,7 +111,7 @@
"expected": 4950
},
{
"description": "multiples of an empty list up to 10000",
"description": "no factors means an empty sum",
"property": "sum",
"input": {
"factors": [],
Expand Down

0 comments on commit 8f89751

Please sign in to comment.