diff --git a/tests/Map/put.php b/tests/Map/put.php index c09a9f1..cf2eb8c 100644 --- a/tests/Map/put.php +++ b/tests/Map/put.php @@ -31,6 +31,11 @@ public function putDataProvider() [[null, null], [null, null]], [[null, null]] ], + [ + // Test that -0.0 and 0.0 map to the same key + [[-0.0, -0.0], [0.0, 0.0]], + [[-0.0, 0.0]], + ] ]; } diff --git a/tests/Set/add.php b/tests/Set/add.php index c114079..ad33190 100644 --- a/tests/Set/add.php +++ b/tests/Set/add.php @@ -23,6 +23,9 @@ public function addDataProvider() [['1'], [ 1 ], ['1', 1 ]], [[ 1 ], ['1'], [ 1, '1']], + // Test that 0.0 and -0.0 are treated as the same value + [[], [0.0, -0.0], [0.0]], + // Test adding sample values to empty set adds all. [[], $unique, $unique],