Skip to content

Commit

Permalink
chore(tests): use built-in min and max (#2718)
Browse files Browse the repository at this point in the history
  • Loading branch information
fukua95 authored Jan 10, 2025
1 parent a21df19 commit 5c4a116
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 144 deletions.
2 changes: 1 addition & 1 deletion tests/gocase/unit/type/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func testLTRIM(t *testing.T, configs util.KvrocksServerConfigs) {
lo := int64(rand.Float64() * float64(startLen))
hi := int64(float64(lo) + rand.Float64()*float64(startLen))

myList = myList[lo:util.Min(int(hi+1), len(myList))]
myList = myList[lo:min(int(hi+1), len(myList))]
require.NoError(t, rdb.LTrim(ctx, key, lo, hi).Err())
require.Equal(t, myList, rdb.LRange(ctx, key, 0, -1).Val(), "failed trim")

Expand Down
38 changes: 0 additions & 38 deletions tests/gocase/util/math.go

This file was deleted.

105 changes: 0 additions & 105 deletions tests/gocase/util/math_test.go

This file was deleted.

0 comments on commit 5c4a116

Please sign in to comment.