diff options
Diffstat (limited to 'examples/redis-unstable/tests/unit/moduleapi/mallocsize.tcl')
| -rw-r--r-- | examples/redis-unstable/tests/unit/moduleapi/mallocsize.tcl | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/examples/redis-unstable/tests/unit/moduleapi/mallocsize.tcl b/examples/redis-unstable/tests/unit/moduleapi/mallocsize.tcl deleted file mode 100644 index f5c4fb3..0000000 --- a/examples/redis-unstable/tests/unit/moduleapi/mallocsize.tcl +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | set testmodule [file normalize tests/modules/mallocsize.so] | ||
| 2 | |||
| 3 | |||
| 4 | start_server {tags {"modules external:skip"}} { | ||
| 5 | r module load $testmodule | ||
| 6 | |||
| 7 | test {MallocSize of raw bytes} { | ||
| 8 | assert_equal [r mallocsize.setraw key 40] {OK} | ||
| 9 | assert_morethan [r memory usage key] 40 | ||
| 10 | } | ||
| 11 | |||
| 12 | test {MallocSize of string} { | ||
| 13 | assert_equal [r mallocsize.setstr key abcdefg] {OK} | ||
| 14 | assert_morethan [r memory usage key] 7 ;# Length of "abcdefg" | ||
| 15 | } | ||
| 16 | |||
| 17 | test {MallocSize of dict} { | ||
| 18 | assert_equal [r mallocsize.setdict key f1 v1 f2 v2] {OK} | ||
| 19 | assert_morethan [r memory usage key] 8 ;# Length of "f1v1f2v2" | ||
| 20 | } | ||
| 21 | } | ||
