Skip to content

Commit 52dbe95

Browse files
committed
fix rounding issue on arm
1 parent f4cfc0a commit 52dbe95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/RedisTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ public function testIncrByFloat()
553553
$this->redis->setOption(Redis::OPT_PREFIX, 'someprefix:');
554554
$this->redis->del('key');
555555
$this->redis->incrbyfloat('key',1.8);
556-
$this->assertEquals('1.8', $this->redis->get('key'));
556+
$this->assertEquals(1.8, floatval($this->redis->get('key'))); // convert to float to avoid rounding issue on arm
557557
$this->redis->setOption(Redis::OPT_PREFIX, '');
558558
$this->assertTrue($this->redis->exists('someprefix:key'));
559559
$this->redis->del('someprefix:key');

0 commit comments

Comments
 (0)