Tests: invalid comparation of float values
WinterSilence opened this issue · comments
$this->assertEquals()
and $this->assertSame()
generates error like as
Failed asserting that 3.3333333333333335 is identical to 3.3333333333333.
at comparing float values.
Need replace invalid assertion to $this->assertEqualsWithDelta()
:
$this->assertEqualsWithDelta(3.3333333333333335, 3.3333333333333, 0.0000001)
https://phpunit.readthedocs.io/en/7.5/assertions.html#assertequalswithdelta
What exactly is the issue that you want to report?
This is certainly not the right repository.
@nicolas-grekas why? this massive problem for polyfill packages
@nicolas-grekas this failed tests on sending PR https://github.com/symfony/polyfill/runs/5335784525?check_suite_focus=true
Sorry I failed to understand that your were talking about the tests of this repo. Now that I see your PR it makes sense.
@nicolas-grekas no problem, but why issue still close? Yes, this PR is "howto" for update same tests