File: rdv_test.go

package info (click to toggle)
golang-github-dgryski-go-rendezvous 0.0~git20200823.9f7001d-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 64 kB
  • sloc: makefile: 2
file content (18 lines) | stat: -rw-r--r-- 237 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package rendezvous

import (
	"hash/fnv"
	"testing"
)

func hashString(s string) uint64 {
	h := fnv.New64a()
	h.Write([]byte(s))
	return h.Sum64()
}

func TestEmpty(t *testing.T) {
	r := New([]string{}, hashString)
	r.Lookup("hello")

}