mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
Implement ZINCRBY/ZADD INCR
This commit is contained in:
parent
39ef7bf630
commit
b9c1288c67
4 changed files with 132 additions and 52 deletions
|
@ -79,4 +79,15 @@ TEST_F(ZSetFamilyTest, ZRemRangeScore) {
|
|||
EXPECT_THAT(Run({"type", "x"}), ElementsAre("none"));
|
||||
}
|
||||
|
||||
TEST_F(ZSetFamilyTest, IncrBy) {
|
||||
auto resp = Run({"zadd", "key", "xx", "incr", "2.1", "member"});
|
||||
EXPECT_THAT(resp[0], ArgType(RespExpr::NIL));
|
||||
|
||||
resp = Run({"zadd", "key", "nx", "incr", "2.1", "member"});
|
||||
EXPECT_THAT(resp[0], "2.1");
|
||||
|
||||
resp = Run({"zadd", "key", "nx", "incr", "4.9", "member"});
|
||||
EXPECT_THAT(resp[0], ArgType(RespExpr::NIL));
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue