|
11 | 11 | "cases": [
|
12 | 12 | {
|
13 | 13 | "uuid": "17146bd5-2e80-4557-ab4c-05632b6b0d01",
|
14 |
| - "property": "total", |
15 | 14 | "description": "Only a single book",
|
16 | 15 | "comments": ["Suggested grouping, [[1]]."],
|
| 16 | + "property": "total", |
17 | 17 | "input": {
|
18 | 18 | "basket": [1]
|
19 | 19 | },
|
20 | 20 | "expected": 800
|
21 | 21 | },
|
22 | 22 | {
|
23 | 23 | "uuid": "cc2de9ac-ff2a-4efd-b7c7-bfe0f43271ce",
|
24 |
| - "property": "total", |
25 | 24 | "description": "Two of the same book",
|
26 | 25 | "comments": ["Suggested grouping, [[2],[2]]."],
|
| 26 | + "property": "total", |
27 | 27 | "input": {
|
28 | 28 | "basket": [2, 2]
|
29 | 29 | },
|
30 | 30 | "expected": 1600
|
31 | 31 | },
|
32 | 32 | {
|
33 | 33 | "uuid": "5a86eac0-45d2-46aa-bbf0-266b94393a1a",
|
34 |
| - "property": "total", |
35 | 34 | "description": "Empty basket",
|
36 | 35 | "comments": ["Suggested grouping, []."],
|
| 36 | + "property": "total", |
37 | 37 | "input": {
|
38 | 38 | "basket": []
|
39 | 39 | },
|
40 | 40 | "expected": 0
|
41 | 41 | },
|
42 | 42 | {
|
43 | 43 | "uuid": "158bd19a-3db4-4468-ae85-e0638a688990",
|
44 |
| - "property": "total", |
45 | 44 | "description": "Two different books",
|
46 | 45 | "comments": ["Suggested grouping, [[1,2]]."],
|
| 46 | + "property": "total", |
47 | 47 | "input": {
|
48 | 48 | "basket": [1, 2]
|
49 | 49 | },
|
50 | 50 | "expected": 1520
|
51 | 51 | },
|
52 | 52 | {
|
53 | 53 | "uuid": "f3833f6b-9332-4a1f-ad98-6c3f8e30e163",
|
54 |
| - "property": "total", |
55 | 54 | "description": "Three different books",
|
56 | 55 | "comments": ["Suggested grouping, [[1,2,3]]."],
|
| 56 | + "property": "total", |
57 | 57 | "input": {
|
58 | 58 | "basket": [1, 2, 3]
|
59 | 59 | },
|
60 | 60 | "expected": 2160
|
61 | 61 | },
|
62 | 62 | {
|
63 | 63 | "uuid": "1951a1db-2fb6-4cd1-a69a-f691b6dd30a2",
|
64 |
| - "property": "total", |
65 | 64 | "description": "Four different books",
|
66 | 65 | "comments": ["Suggested grouping, [[1,2,3,4]]."],
|
| 66 | + "property": "total", |
67 | 67 | "input": {
|
68 | 68 | "basket": [1, 2, 3, 4]
|
69 | 69 | },
|
70 | 70 | "expected": 2560
|
71 | 71 | },
|
72 | 72 | {
|
73 | 73 | "uuid": "d70f6682-3019-4c3f-aede-83c6a8c647a3",
|
74 |
| - "property": "total", |
75 | 74 | "description": "Five different books",
|
76 | 75 | "comments": ["Suggested grouping, [[1,2,3,4,5]]."],
|
| 76 | + "property": "total", |
77 | 77 | "input": {
|
78 | 78 | "basket": [1, 2, 3, 4, 5]
|
79 | 79 | },
|
80 | 80 | "expected": 3000
|
81 | 81 | },
|
82 | 82 | {
|
83 | 83 | "uuid": "78cacb57-911a-45f1-be52-2a5bd428c634",
|
84 |
| - "property": "total", |
85 | 84 | "description": "Two groups of four is cheaper than group of five plus group of three",
|
86 | 85 | "comments": ["Suggested grouping, [[1,2,3,4],[1,2,3,5]]."],
|
| 86 | + "property": "total", |
87 | 87 | "input": {
|
88 | 88 | "basket": [1, 1, 2, 2, 3, 3, 4, 5]
|
89 | 89 | },
|
90 | 90 | "expected": 5120
|
91 | 91 | },
|
92 | 92 | {
|
93 | 93 | "uuid": "f808b5a4-e01f-4c0d-881f-f7b90d9739da",
|
94 |
| - "property": "total", |
95 | 94 | "description": "Two groups of four is cheaper than groups of five and three",
|
96 | 95 | "comments": [
|
97 | 96 | "Suggested grouping, [[1,2,4,5],[1,3,4,5]]. This differs from the other 'two groups of four' test in that it will fail for solutions that add books to groups in the order in which they appear in the list."
|
98 | 97 | ],
|
| 98 | + "property": "total", |
99 | 99 | "input": {
|
100 | 100 | "basket": [1, 1, 2, 3, 4, 4, 5, 5]
|
101 | 101 | },
|
102 | 102 | "expected": 5120
|
103 | 103 | },
|
104 | 104 | {
|
105 | 105 | "uuid": "fe96401c-5268-4be2-9d9e-19b76478007c",
|
106 |
| - "property": "total", |
107 | 106 | "description": "Group of four plus group of two is cheaper than two groups of three",
|
108 | 107 | "comments": ["Suggested grouping, [[1,2,3,4],[1,2]]."],
|
| 108 | + "property": "total", |
109 | 109 | "input": {
|
110 | 110 | "basket": [1, 1, 2, 2, 3, 4]
|
111 | 111 | },
|
112 | 112 | "expected": 4080
|
113 | 113 | },
|
114 | 114 | {
|
115 | 115 | "uuid": "68ea9b78-10ad-420e-a766-836a501d3633",
|
116 |
| - "property": "total", |
117 | 116 | "description": "Two each of first 4 books and 1 copy each of rest",
|
118 | 117 | "comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4]]."],
|
| 118 | + "property": "total", |
119 | 119 | "input": {
|
120 | 120 | "basket": [1, 1, 2, 2, 3, 3, 4, 4, 5]
|
121 | 121 | },
|
122 | 122 | "expected": 5560
|
123 | 123 | },
|
124 | 124 | {
|
125 | 125 | "uuid": "c0a779d5-a40c-47ae-9828-a340e936b866",
|
126 |
| - "property": "total", |
127 | 126 | "description": "Two copies of each book",
|
128 | 127 | "comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4,5]]."],
|
| 128 | + "property": "total", |
129 | 129 | "input": {
|
130 | 130 | "basket": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]
|
131 | 131 | },
|
132 | 132 | "expected": 6000
|
133 | 133 | },
|
134 | 134 | {
|
135 | 135 | "uuid": "18fd86fe-08f1-4b68-969b-392b8af20513",
|
136 |
| - "property": "total", |
137 | 136 | "description": "Three copies of first book and 2 each of remaining",
|
138 | 137 | "comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4,5],[1]]."],
|
| 138 | + "property": "total", |
139 | 139 | "input": {
|
140 | 140 | "basket": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1]
|
141 | 141 | },
|
142 | 142 | "expected": 6800
|
143 | 143 | },
|
144 | 144 | {
|
145 | 145 | "uuid": "0b19a24d-e4cf-4ec8-9db2-8899a41af0da",
|
146 |
| - "property": "total", |
147 | 146 | "description": "Three each of first 2 books and 2 each of remaining books",
|
148 | 147 | "comments": ["Suggested grouping, [[1,2,3,4,5],[1,2,3,4,5],[1,2]]."],
|
| 148 | + "property": "total", |
149 | 149 | "input": {
|
150 | 150 | "basket": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2]
|
151 | 151 | },
|
152 | 152 | "expected": 7520
|
153 | 153 | },
|
154 | 154 | {
|
155 | 155 | "uuid": "bb376344-4fb2-49ab-ab85-e38d8354a58d",
|
156 |
| - "property": "total", |
157 | 156 | "description": "Four groups of four are cheaper than two groups each of five and three",
|
158 | 157 | "comments": [
|
159 | 158 | "Suggested grouping, [[1,2,3,4],[1,2,3,5],[1,2,3,4],[1,2,3,5]]."
|
160 | 159 | ],
|
| 160 | + "property": "total", |
161 | 161 | "input": {
|
162 | 162 | "basket": [1, 1, 2, 2, 3, 3, 4, 5, 1, 1, 2, 2, 3, 3, 4, 5]
|
163 | 163 | },
|
164 | 164 | "expected": 10240
|
165 | 165 | },
|
166 | 166 | {
|
167 | 167 | "uuid": "5260ddde-2703-4915-b45a-e54dbbac4303",
|
168 |
| - "property": "total", |
169 | 168 | "description": "Check that groups of four are created properly even when there are more groups of three than groups of five",
|
170 | 169 | "comments": [
|
171 | 170 | "Suggested grouping, [[1,2,3,4],[1,2,3,5],[1,2,3,4],[1,2,3,5],[1,2,3],[1,2,3]]."
|
172 | 171 | ],
|
| 172 | + "property": "total", |
173 | 173 | "input": {
|
174 | 174 | "basket": [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5]
|
175 | 175 | },
|
176 | 176 | "expected": 14560
|
177 | 177 | },
|
178 | 178 | {
|
179 | 179 | "uuid": "b0478278-c551-4747-b0fc-7e0be3158b1f",
|
180 |
| - "property": "total", |
181 | 180 | "description": "One group of one and four is cheaper than one group of two and three",
|
182 | 181 | "comments": ["Suggested grouping, [[1],[1,2,3,4]]."],
|
| 182 | + "property": "total", |
183 | 183 | "input": {
|
184 | 184 | "basket": [1, 1, 2, 3, 4]
|
185 | 185 | },
|
186 | 186 | "expected": 3360
|
187 | 187 | },
|
188 | 188 | {
|
189 | 189 | "uuid": "cf868453-6484-4ae1-9dfc-f8ee85bbde01",
|
190 |
| - "property": "total", |
191 | 190 | "description": "One group of one and two plus three groups of four is cheaper than one group of each size",
|
192 | 191 | "comments": [
|
193 | 192 | "Suggested grouping, [[5],[5,4],[5,4,3,2],[5,4,3,2],[5,4,3,1]]."
|
194 | 193 | ],
|
| 194 | + "property": "total", |
195 | 195 | "input": {
|
196 | 196 | "basket": [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]
|
197 | 197 | },
|
|
0 commit comments