MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / Test_exists

Function Test_exists

structure/zset_test.go:974–1006  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

972 }
973}
974func Test_exists(t *testing.T) {
975 zs, _ := initZSetDB()
976
977 tt := []struct {
978 key string
979 score int
980 member string
981 want bool
982 }{
983 {
984 key: "",
985 score: 1,
986 member: "",
987 want: false,
988 },
989 {
990 key: "key1",
991 score: 1,
992 member: "",
993 want: false,
994 },
995 }
996
997 for _, tc := range tt {
998 t.Run("", func(t *testing.T) {
999 got := zs.exists(tc.key, tc.score, tc.member)
1000
1001 if got != tc.want {
1002 t.Errorf("exists() = %v, want %v", got, tc.want)
1003 }
1004 })
1005 }
1006}
1007func TestNewZSetStructure(t *testing.T) {
1008 tt := []struct {
1009 name string

Callers

nothing calls this directly

Calls 2

initZSetDBFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected