@@ -241,7 +241,7 @@ func Test_abs(t *testing.T) {
241241 }
242242}
243243
244- func Test_Weights_absMaxWeight (t * testing.T ) {
244+ func Test_Weights_maxWeight (t * testing.T ) {
245245 theories := []struct {
246246 weights Weights
247247 expected int
@@ -270,7 +270,7 @@ func Test_Weights_absMaxWeight(t *testing.T) {
270270 }
271271
272272 for _ , theory := range theories {
273- actual := theory .weights .absMaxWeight ()
273+ actual := theory .weights .maxWeight ()
274274 assert .Equal (t , theory .expected , actual )
275275 }
276276}
@@ -284,7 +284,7 @@ func Test_absSum(t *testing.T) {
284284 {terms : []int {0 , 0 , 0 }, expected : 0 },
285285 {terms : []int {- 1 , - 2 , - 3 }, expected : 6 },
286286 {terms : []int {1 , 2 , 3 }, expected : 6 },
287- {terms : []int {- 1 , - 2 , - 3 }, expected : 6 },
287+ {terms : []int {- 1 , 2 , - 3 }, expected : 6 },
288288 }
289289
290290 for _ , theory := range theories {
@@ -302,20 +302,20 @@ func Test_calculatePeriodWeights(t *testing.T) {
302302 want Weights
303303 }{
304304 {
305- name : "given no periodIDs should return empty Weights" ,
305+ name : "no periodIDs should return empty Weights" ,
306306 periodIDs : []string {},
307307 want : Weights {},
308308 },
309309 {
310- name : "given periodIDs and zero notSelectedSum and preferredSum" ,
310+ name : "zero notSelectedSum and preferredSum" ,
311311 periodIDs : []string {"a" , "b" },
312312 want : Weights {
313313 "a" : 0 ,
314314 "b" : - 1 ,
315315 },
316316 },
317317 {
318- name : "given periodIDs and non-zero positive notSelectedSum" ,
318+ name : "non-zero positive notSelectedSum" ,
319319 periodIDs : []string {"a" , "b" },
320320 notSelectedSum : 1 ,
321321 want : Weights {
@@ -324,7 +324,7 @@ func Test_calculatePeriodWeights(t *testing.T) {
324324 },
325325 },
326326 {
327- name : "given periodIDs and non-zero negative notSelectedSum" ,
327+ name : "non-zero negative notSelectedSum" ,
328328 periodIDs : []string {"a" , "b" },
329329 notSelectedSum : - 1 ,
330330 want : Weights {
@@ -333,7 +333,7 @@ func Test_calculatePeriodWeights(t *testing.T) {
333333 },
334334 },
335335 {
336- name : "given periodIDs and non-zero preferredSum and notSelectedSum" ,
336+ name : "non-zero preferredSum and notSelectedSum" ,
337337 periodIDs : []string {"a" , "b" },
338338 notSelectedSum : - 1 ,
339339 preferredSum : - 2 ,
0 commit comments