mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-18 02:41:09 +00:00
Fix NaN unit test in phpunit 3.7.14
In phpunit 3.6.10, assertEquals considered two NaNs to be equivalent. Somewhere between that and phpunit 3.7.14, this behavior changed so NaNs are no longer considered equivalent. Change-Id: I2c664498eb34cf5119a2eaaa96a6be57b821ab94
This commit is contained in:
parent
bf689b7758
commit
2b08f5a5c0
|
@ -69,14 +69,14 @@ abstract class Scribunto_LuaInterpreterTest extends MediaWikiTestCase {
|
|||
|
||||
$passthru = $interpreter->loadString( 'return ...', 'passthru' );
|
||||
$ret = $interpreter->callFunction( $passthru, NAN );
|
||||
$this->assertEquals( array( NAN ), $ret );
|
||||
$this->assertTrue( is_nan( $ret[0] ), 'NaN was not passed through' );
|
||||
|
||||
$interpreter->registerLibrary( 'test',
|
||||
array( 'passthru' => array( $this, 'passthru' ) ) );
|
||||
$doublePassthru = $interpreter->loadString(
|
||||
'return test.passthru(...)', 'doublePassthru' );
|
||||
$ret = $interpreter->callFunction( $doublePassthru, NAN );
|
||||
$this->assertEquals( array( NAN ), $ret );
|
||||
$this->assertTrue( is_nan( $ret[0] ), 'NaN was not double passed through' );
|
||||
}
|
||||
|
||||
function normalizeOrder( $a ) {
|
||||
|
|
Loading…
Reference in a new issue