(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestHashDel(t *testing.T) { |
| 178 | server.Clear() |
| 179 | |
| 180 | c, err := proto.Dial(server.Addr()) |
| 181 | ok(t, err) |
| 182 | defer c.Close() |
| 183 | |
| 184 | assert(t, !directDoBool(t, c, "EXISTS", "wim"), "no more wim key") |
| 185 | |
| 186 | // Key doesn't exists. |
| 187 | must0(t, c, "HDEL", "nosuch", "nosuch") |
| 188 | |
| 189 | // Wrong key type |
| 190 | directDoString(t, c, "SET", "foo", "bar") |
| 191 | mustDo(t, c, "HDEL", "foo", "nosuch", proto.Error(msgWrongType)) |
| 192 | |
| 193 | // Direct HDel() |
| 194 | directDo(t, c, "HSET", "aap", "noot", "mies") |
| 195 | directDo(t, c, "HDEL", "aap", "noot") |
| 196 | equals(t, "", directDoString(t, c, "HGET", "aap", "noot")) |
| 197 | } |
| 198 | |
| 199 | func TestHashExists(t *testing.T) { |
| 200 | server.Clear() |
nothing calls this directly
no test coverage detected