(t *testing.T)
| 972 | } |
| 973 | } |
| 974 | func 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 | } |
| 1007 | func TestNewZSetStructure(t *testing.T) { |
| 1008 | tt := []struct { |
| 1009 | name string |
nothing calls this directly
no test coverage detected