skip a test that uses +inf on valgrind (#7440)
On some platforms strtold("+inf") with valgrind returns a non-inf result [err]: INCRBYFLOAT does not allow NaN or Infinity in tests/unit/type/incr.tcl Expected 'ERR*would produce*' to equal or match '1189731495357231765085759.....' (cherry picked from commit 909bc97c526db757a3d022b29911ff6d08eba59c)
This commit is contained in:
parent
2b5f23197c
commit
33ca884cc5
@ -130,15 +130,18 @@ start_server {tags {"incr"}} {
|
|||||||
format $err
|
format $err
|
||||||
} {WRONGTYPE*}
|
} {WRONGTYPE*}
|
||||||
|
|
||||||
test {INCRBYFLOAT does not allow NaN or Infinity} {
|
# On some platforms strtold("+inf") with valgrind returns a non-inf result
|
||||||
r set foo 0
|
if {!$::valgrind} {
|
||||||
set err {}
|
test {INCRBYFLOAT does not allow NaN or Infinity} {
|
||||||
catch {r incrbyfloat foo +inf} err
|
r set foo 0
|
||||||
set err
|
set err {}
|
||||||
# p.s. no way I can force NaN to test it from the API because
|
catch {r incrbyfloat foo +inf} err
|
||||||
# there is no way to increment / decrement by infinity nor to
|
set err
|
||||||
# perform divisions.
|
# p.s. no way I can force NaN to test it from the API because
|
||||||
} {ERR*would produce*}
|
# there is no way to increment / decrement by infinity nor to
|
||||||
|
# perform divisions.
|
||||||
|
} {ERR*would produce*}
|
||||||
|
}
|
||||||
|
|
||||||
test {INCRBYFLOAT decrement} {
|
test {INCRBYFLOAT decrement} {
|
||||||
r set foo 1
|
r set foo 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user