Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
23ba5c10
Commit
23ba5c10
authored
May 29, 2015
by
antirez
Browse files
Test: ZADD INCR test
parent
910e72d1
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/unit/type/zset.tcl
View file @
23ba5c10
...
...
@@ -100,6 +100,20 @@ start_server {tags {"zset"}} {
assert
{[
r zscore ztmp b
]
== 200
}
}
test
"ZADD INCR works like ZINCRBY"
{
r del ztmp
r zadd ztmp 10 x 20 y 30 z
r zadd ztmp INCR 15 x
assert
{[
r zscore ztmp x
]
== 25
}
}
test
"ZADD INCR works with a single score-elemenet pair"
{
r del ztmp
r zadd ztmp 10 x 20 y 30 z
catch
{
r zadd ztmp INCR 15 x 10 y
}
err
set err
}
{
ERR*
}
test
"ZINCRBY calls leading to NaN result in error"
{
r zincrby myzset +inf abc
assert_error
"*NaN*"
{
r zincrby myzset -inf abc
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment