blob: 132fff9446468655d2492f9c86461deb4ece7862 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
From eb8c71d063e3b45855b8454e1e75c45ab1e0c188 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Wed, 3 Jun 2015 15:13:30 +0200
Subject: [PATCH] avoid float precision issue
---
tests/dataset_average_test.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/dataset_average_test.php b/tests/dataset_average_test.php
index ee5fc4e..23f209b 100644
--- a/tests/dataset_average_test.php
+++ b/tests/dataset_average_test.php
@@ -334,7 +334,7 @@ public function testIterateOverAverageDataset2()
foreach ( $averageDataSet as $key => $value )
{
- $this->assertEquals( (string) ( $start += $stepSize ), $key, 'Wrong step.', .01 );
+ $this->assertEquals( (string) ( round($start += $stepSize,12) ), $key, 'Wrong step.');
}
}
|