On Mon, Feb 4, 2013 at 9:50 PM, Levi Morrison <le...@php.net> wrote: > I have been compiling PHP under various compilers trying to figure out > what flags I need for each compiler to pass all tests excluding > XFAILs. With Intel 13.0.1 I'm down to two failing tests: > > ===================================================================== > FAILED TEST SUMMARY > --------------------------------------------------------------------- > Test fmod() - basic function test fmod() > [ext/standard/tests/math/fmod_basic.phpt] > Test fmod function : 64bit long tests > [ext/standard/tests/math/fmod_basiclong_64bit.phpt] > ===================================================================== > > The only differences are between -0 and 0 (exact diffs at end of message). > > My understanding of floating point calculations is that -0 and 0 are > equivalent, so I can safely ignore the failures. I wanted to first > check to make sure that is actually true. > > Assuming that the above is correct, I wanted to patch the phpt files > for the tests to pass. However, I'm not very familiar with that > format. How would you suggest altering the tests to make this pass? > > ---------- > > cat ext/standard/tests/math/fmod_basic.diff > 016+ float(0) > 017+ float(0) > 016- float(-0) > 017- float(-0) > 020+ float(0) > 021+ float(0) > 022+ float(0) > 020- float(-0) > 021- float(-0) > 022- float(-0) > 026+ float(0) > 026- float(-0) > > cat ext/standard/tests/math/fmod_basiclong_64bit.diff > 026+ float(0) > 026- float(-0) > 028+ float(0) > 028- float(-0) > 040+ float(0) > 040- float(-0) > 042+ float(0) > 042- float(-0) > 044+ float(0) > 044- float(-0) > 070+ float(0) > 070- float(-0) > 072+ float(0) > 072- float(-0) > 084+ float(0) > 084- float(-0) > 114+ float(0) > 114- float(-0) > 116+ float(0) > 116- float(-0) > 128+ float(0) > 128- float(-0) > 158+ float(0) > 158- float(-0) > 160+ float(0) > 160- float(-0) > 290+ float(0) > 290- float(-0) > 292+ float(0) > 292- float(-0) > 304+ float(0) > 304- float(-0) > 306+ float(0) > 306- float(-0) > 308+ float(0) > 308- float(-0) > 312+ float(0) > 312- float(-0) > 314+ float(0) > 314- float(-0) > 326+ float(0) > 326- float(-0) > 328+ float(0) > 328- float(-0) > 330+ float(0) > 330- float(-0) > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > hi,
you could use EXPECTREGEX ( http://qa.php.net/phpt_details.php#expectregex_section) with something like float\([\+\-]*0\) -- Ferenc Kovács @Tyr43l - http://tyrael.hu