Skip to content

Commit

Permalink
Fix Test in bruteforcer so it works with go > 1.20
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
  • Loading branch information
ChriMarMe committed Jan 30, 2024
1 parent 30fc165 commit 0cd3428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/bruteforcer/indexes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ func TestGetCombinationID(t *testing.T) {
}

func TestSetGetCombinationID(t *testing.T) {
rand.Seed(0)
r := rand.New(rand.NewSource(0))
iter := NewUniqueUnorderedCombinationIterator(10, 70)
amountOfCombinations := uint64(binomialCoefficient(70, 10))
for i := 0; i < 100; i++ {
combinationID := rand.Uint64() % amountOfCombinations
combinationID := r.Uint64() % amountOfCombinations
iter.SetCombinationID(combinationID)
require.Equal(t, combinationID, iter.GetCombinationID())
iter.Next()
Expand Down

0 comments on commit 0cd3428

Please sign in to comment.