(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func TestWeightingHits(t *testing.T) { |
| 27 | rank := createRank() |
| 28 | |
| 29 | def := NewAlgorithmDefault() |
| 30 | weightDef := def.WeightingHits(0, rank) |
| 31 | |
| 32 | assert.Equal(t, float32(2), weightDef) |
| 33 | |
| 34 | chain := NewAlgorithmChain() |
| 35 | weightChain := chain.WeightingHits(0, rank) |
| 36 | |
| 37 | assert.Equal(t, float32(3), weightChain) |
| 38 | |
| 39 | weightChain = chain.WeightingHits(2, rank) |
| 40 | |
| 41 | assert.Equal(t, float32(3), weightChain) |
| 42 | } |
| 43 | |
| 44 | func createRank() *Rank { |
| 45 | rank := NewRank() |
nothing calls this directly
no test coverage detected