File tree Expand file tree Collapse file tree 1 file changed +41
-15
lines changed
exercises/perfect-numbers Expand file tree Collapse file tree 1 file changed +41
-15
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"exercise" : " perfect-numbers" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"cases" : [
5
5
{
6
6
"description" : " Perfect numbers" ,
7
7
"cases" : [
8
8
{
9
9
"description" : " Smallest perfect number is classified correctly" ,
10
10
"property" : " classify" ,
11
- "input" : 6 ,
11
+ "input" : {
12
+ "number" : 6
13
+ },
12
14
"expected" : " perfect"
13
15
},
14
16
{
15
17
"description" : " Medium perfect number is classified correctly" ,
16
18
"property" : " classify" ,
17
- "input" : 28 ,
19
+ "input" : {
20
+ "number" : 28
21
+ },
18
22
"expected" : " perfect"
19
23
},
20
24
{
21
25
"description" : " Large perfect number is classified correctly" ,
22
26
"property" : " classify" ,
23
- "input" : 33550336 ,
27
+ "input" : {
28
+ "number" : 33550336
29
+ },
24
30
"expected" : " perfect"
25
31
}
26
32
]
31
37
{
32
38
"description" : " Smallest abundant number is classified correctly" ,
33
39
"property" : " classify" ,
34
- "input" : 12 ,
40
+ "input" : {
41
+ "number" : 12
42
+ },
35
43
"expected" : " abundant"
36
44
},
37
45
{
38
46
"description" : " Medium abundant number is classified correctly" ,
39
47
"property" : " classify" ,
40
- "input" : 30 ,
48
+ "input" : {
49
+ "number" : 30
50
+ },
41
51
"expected" : " abundant"
42
52
},
43
53
{
44
54
"description" : " Large abundant number is classified correctly" ,
45
55
"property" : " classify" ,
46
- "input" : 33550335 ,
56
+ "input" : {
57
+ "number" : 33550335
58
+ },
47
59
"expected" : " abundant"
48
60
}
49
61
]
54
66
{
55
67
"description" : " Smallest prime deficient number is classified correctly" ,
56
68
"property" : " classify" ,
57
- "input" : 2 ,
69
+ "input" : {
70
+ "number" : 2
71
+ },
58
72
"expected" : " deficient"
59
73
},
60
74
{
61
75
"description" : " Smallest non-prime deficient number is classified correctly" ,
62
76
"property" : " classify" ,
63
- "input" : 4 ,
77
+ "input" : {
78
+ "number" : 4
79
+ },
64
80
"expected" : " deficient"
65
81
},
66
82
{
67
83
"description" : " Medium deficient number is classified correctly" ,
68
84
"property" : " classify" ,
69
- "input" : 32 ,
85
+ "input" : {
86
+ "number" : 32
87
+ },
70
88
"expected" : " deficient"
71
89
},
72
90
{
73
91
"description" : " Large deficient number is classified correctly" ,
74
92
"property" : " classify" ,
75
- "input" : 33550337 ,
93
+ "input" : {
94
+ "number" : 33550337
95
+ },
76
96
"expected" : " deficient"
77
97
},
78
98
{
79
99
"description" : " Edge case (no factors other than itself) is classified correctly" ,
80
100
"property" : " classify" ,
81
- "input" : 1 ,
101
+ "input" : {
102
+ "number" : 1
103
+ },
82
104
"expected" : " deficient"
83
105
}
84
106
]
89
111
{
90
112
"description" : " Zero is rejected (not a natural number)" ,
91
113
"property" : " classify" ,
92
- "input" : 0 ,
114
+ "input" : {
115
+ "number" : 0
116
+ },
93
117
"expected" : {
94
118
"error" : " Classification is only possible for natural numbers."
95
119
}
96
120
},
97
121
{
98
122
"description" : " Negative integer is rejected (not a natural number)" ,
99
123
"property" : " classify" ,
100
- "input" : -1 ,
124
+ "input" : {
125
+ "number" : -1
126
+ },
101
127
"expected" : {
102
128
"error" : " Classification is only possible for natural numbers."
103
129
}
104
130
}
105
131
]
106
132
}
107
133
]
108
- }
134
+ }
You can’t perform that action at this time.
0 commit comments