mirror of
https://github.com/tc39/test262.git
synced 2025-07-06 13:44:40 +02:00
which have resulted in it being able to run negative test cases which corrupt the global JavaScript environment. This lets us enable fifty plus more Sputnik test cases. Another positive result from this test harness refactoring is that Opera no longer hangs when running the tests.
20 lines
559 B
JavaScript
20 lines
559 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
var prec;
|
|
function isEqual(num1, num2)
|
|
{
|
|
if ((num1 === Infinity)&&(num2 === Infinity))
|
|
{
|
|
return(true);
|
|
}
|
|
if ((num1 === -Infinity)&&(num2 === -Infinity))
|
|
{
|
|
return(true);
|
|
}
|
|
prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2)));
|
|
return(Math.abs(num1 - num2) <= prec);
|
|
//return(num1 === num2);
|
|
}
|
|
|