1
+ {
2
+ "exercise" : " perfect-numbers" ,
3
+ "version" : " 1.0.0" ,
4
+ "cases" : [
5
+ {
6
+ "description" : " Perfect numbers" ,
7
+ "cases" : [
8
+ {
9
+ "description" : " Smallest perfect number is classified correctly" ,
10
+ "property" : " classify" ,
11
+ "input" : 6 ,
12
+ "expected" : " perfect"
13
+ },
14
+ {
15
+ "description" : " Medium perfect number is classified correctly" ,
16
+ "property" : " classify" ,
17
+ "input" : 28 ,
18
+ "expected" : " perfect"
19
+ },
20
+ {
21
+ "description" : " Large perfect number is classified correctly" ,
22
+ "property" : " classify" ,
23
+ "input" : 33550336 ,
24
+ "expected" : " perfect"
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "description" : " Abundant numbers" ,
30
+ "cases" : [
31
+ {
32
+ "description" : " Smallest abundant number is classified correctly" ,
33
+ "property" : " classify" ,
34
+ "input" : 12 ,
35
+ "expected" : " abundant"
36
+ },
37
+ {
38
+ "description" : " Medium abundant number is classified correctly" ,
39
+ "property" : " classify" ,
40
+ "input" : 30 ,
41
+ "expected" : " abundant"
42
+ },
43
+ {
44
+ "description" : " Large abundant number is classified correctly" ,
45
+ "property" : " classify" ,
46
+ "input" : 33550335 ,
47
+ "expected" : " abundant"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "description" : " Deficient numbers" ,
53
+ "cases" : [
54
+ {
55
+ "description" : " Smallest prime deficient number is classified correctly" ,
56
+ "property" : " classify" ,
57
+ "input" : 2 ,
58
+ "expected" : " deficient"
59
+ },
60
+ {
61
+ "description" : " Smallest non-prime deficient number is classified correctly" ,
62
+ "property" : " classify" ,
63
+ "input" : 4 ,
64
+ "expected" : " deficient"
65
+ },
66
+ {
67
+ "description" : " Medium deficient number is classified correctly" ,
68
+ "property" : " classify" ,
69
+ "input" : 32 ,
70
+ "expected" : " deficient"
71
+ },
72
+ {
73
+ "description" : " Large deficient number is classified correctly" ,
74
+ "property" : " classify" ,
75
+ "input" : 33550337 ,
76
+ "expected" : " deficient"
77
+ },
78
+ {
79
+ "description" : " Edge case (no factors other than itself) is classified correctly" ,
80
+ "property" : " classify" ,
81
+ "input" : 1 ,
82
+ "expected" : " deficient"
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "description" : " Invalid inputs" ,
88
+ "cases" : [
89
+ {
90
+ "description" : " Non-negative integer is rejected (not a natural number)" ,
91
+ "property" : " classify" ,
92
+ "input" : 0 ,
93
+ "expected" : {
94
+ "error" : " Classification is only possible for natural numbers."
95
+ }
96
+ },
97
+ {
98
+ "description" : " Negative integer is rejected (not a natural number)" ,
99
+ "property" : " classify" ,
100
+ "input" : -1 ,
101
+ "expected" : {
102
+ "error" : " Classification is only possible for natural numbers."
103
+ }
104
+ }
105
+ ]
106
+ }
107
+ ]
108
+ }
0 commit comments