Skip to content

Commit 73bda30

Browse files
committed
Rewrite with shorter descriptions that speak to the functionality not the values in the tests - based on PR review discussions
1 parent 6a9b757 commit 73bda30

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

exercises/prime-factors/canonical-data.json

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,37 @@
33
"description": "returns prime factors for the given input number",
44
"cases": [
55
{
6-
"description" : "returns no prime factors for 1",
6+
"description" : "no factors",
77
"input" : 1,
88
"expected" : []
99
},
1010
{
11-
"description" : "returns [2] as the prime factors for 2",
11+
"description" : "prime number",
1212
"input" : 2,
1313
"expected" : [2]
1414
},
1515
{
16-
"description" : "returns [3] as the prime factors for 3",
17-
"input" : 3,
18-
"expected" : [3]
19-
},
20-
{
21-
"description" : "returns [2,2] as the prime factors for 4",
22-
"input" : 4,
23-
"expected" : [2, 2]
24-
},
25-
{
26-
"description" : "returns [2,3] as the prime factors for 6",
27-
"input" : 6,
28-
"expected" : [2, 3]
29-
},
30-
{
31-
"description" : "returns [2,2,2] as the prime factors for 8",
32-
"input" : 8,
33-
"expected" : [2, 2, 2]
34-
},
35-
{
36-
"description" : "returns [3,3] as the prime factors for 9",
16+
"description" : "square of a prime",
3717
"input" : 9,
3818
"expected" : [3, 3]
3919
},
4020
{
41-
"description" : "returns [3,3,3] as the prime factors for 27",
42-
"input" : 27,
43-
"expected" : [3, 3, 3]
21+
"description" : "cube of a prime",
22+
"input" : 8,
23+
"expected" : [2, 2, 2]
4424
},
4525
{
46-
"description" : "returns [5,5,5,5] as the prime factors for 625",
47-
"input" : 625,
48-
"expected" : [5, 5, 5, 5]
26+
"description" : "product of primes and non-primes",
27+
"input" : 12,
28+
"expected" : [2, 2, 3]
4929
},
5030
{
51-
"description" : "returns [5, 17, 23, 461] as the prime factors for 901255",
31+
"description" : "product of primes",
5232
"input" : 901255,
5333
"expected" : [5, 17, 23, 461]
5434
},
5535
{
56-
"description" : "returns [11, 9539, 894119] as the prime factors for 93819012551",
36+
"description" : "factors include a large prime",
5737
"input" : 93819012551,
5838
"expected" : [11, 9539, 894119]
5939
}

0 commit comments

Comments
 (0)