From cd4aba36cdf5b9599e94029793dcfd13cd199577 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 16 Nov 2011 13:30:43 +0100 Subject: [PATCH] valgrind handles floating point numbers differently for some reason, so using "simpler" numbers to make tests happy. --- tests/unit/basic.tcl | 4 ++-- tests/unit/type/hash.tcl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/basic.tcl b/tests/unit/basic.tcl index b76c45a4..fec782ef 100644 --- a/tests/unit/basic.tcl +++ b/tests/unit/basic.tcl @@ -213,8 +213,8 @@ start_server {tags {"basic"}} { test {INCRBYFLOAT decrement} { r set foo 1 - r incrbyfloat foo -1.256 - } {-0.256} + r incrbyfloat foo -1.1 + } {-0.1} test "SETNX target key missing" { r del novar diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 863c51a4..2b2a684e 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -335,11 +335,11 @@ start_server {tags {"hash"}} { test {HINCRBYFLOAT against hash key created by hincrby itself} { set rv {} - lappend rv [r hincrbyfloat smallhash tmp 3.1] + lappend rv [r hincrbyfloat smallhash tmp 3.5] lappend rv [r hget smallhash tmp] - lappend rv [r hincrbyfloat bighash tmp 3.1] + lappend rv [r hincrbyfloat bighash tmp 3.5] lappend rv [r hget bighash tmp] - } {5.6 5.6 5.6 5.6} + } {6 6 6 6} test {HINCRBYFLOAT against hash key originally set with HSET} { r hset smallhash tmp 100 -- 2.47.2