| 1 | //go:build go1.24 |
| 2 | // +build go1.24 |
| 3 | |
| 4 | package hasherscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/ |
| 5 | |
| 6 | import ( |
| 7 | "strconvscip-go gomod github.com/golang/go/src go1.20 strconv/" |
| 8 | "testingscip-go gomod github.com/golang/go/src go1.20 testing/" |
| 9 | |
| 10 | "github.com/stretchr/testify/requirescip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/" |
| 11 | ) |
| 12 | |
| 13 | type Fooscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo# struct { |
| 14 | Barscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#Bar. string |
| 15 | } |
| 16 | |
| 17 | func TestHasher_StringKeyscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/TestHasher_StringKey().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 18 | hasher := NewHasherscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/NewHasher().[string](nil) |
| 19 | h := hasher.Hashscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Hasher#Hash().(strconvscip-go gomod github.com/golang/go/src go1.20 strconv/.Itoascip-go gomod github.com/golang/go/src go1.20 strconv/Itoa().(123456)) |
| 20 | for i := 0; i < 10; i++ { |
| 21 | requirescip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/.Equalscip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/Equal().(t, h, hasher.Hashscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Hasher#Hash().(strconvscip-go gomod github.com/golang/go/src go1.20 strconv/.Itoascip-go gomod github.com/golang/go/src go1.20 strconv/Itoa().(123456))) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func TestHasher_StructStringKeyscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/TestHasher_StructStringKey().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 26 | hasher1 := NewHasherscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/NewHasher().[Fooscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#](nil) |
| 27 | hasher2 := NewHasherscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/NewHasher().[Fooscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#](func(k Fooscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#) string { |
| 28 | return k.Barscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#Bar. |
| 29 | }) |
| 30 | h1 := uint64(0) |
| 31 | h2 := uint64(0) |
| 32 | for i := 0; i < 10; i++ { |
| 33 | foo := Fooscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#{Barscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#Bar.: strconvscip-go gomod github.com/golang/go/src go1.20 strconv/.Itoascip-go gomod github.com/golang/go/src go1.20 strconv/Itoa().(123456)} |
| 34 | if h1 == 0 { |
| 35 | h1 = hasher1.Hashscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Hasher#Hash().(foo) |
| 36 | } else { |
| 37 | requirescip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/.Equalscip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/Equal().(t, h1, hasher1.Hashscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Hasher#Hash().(foo)) |
| 38 | } |
| 39 | } |
| 40 | for i := 0; i < 10; i++ { |
| 41 | foo := Fooscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#{Barscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Foo#Bar.: strconvscip-go gomod github.com/golang/go/src go1.20 strconv/.Itoascip-go gomod github.com/golang/go/src go1.20 strconv/Itoa().(123456)} |
| 42 | if h2 == 0 { |
| 43 | h2 = hasher2.Hashscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Hasher#Hash().(foo) |
| 44 | } else { |
| 45 | requirescip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/.Equalscip-go gomod github.com/stretchr/testify v1.8.2 `github.com/stretchr/testify/require`/Equal().(t, h2, hasher2.Hashscip-go gomod github.com/Yiling-J/theine-go . `github.com/Yiling-J/theine-go/internal/hasher`/Hasher#Hash().(foo)) |
| 46 | } |
| 47 | } |
| 48 | } |