| Index: test/mjsunit/harmony/math-sign.js
|
| diff --git a/src/a64/debugger-a64.h b/test/mjsunit/harmony/math-sign.js
|
| similarity index 64%
|
| copy from src/a64/debugger-a64.h
|
| copy to test/mjsunit/harmony/math-sign.js
|
| index 1317b5f37d3c55ceff6132960d507cdd4bb22e22..8a89d62828bdbd43a972498f0b32d1a27939171e 100644
|
| --- a/src/a64/debugger-a64.h
|
| +++ b/test/mjsunit/harmony/math-sign.js
|
| @@ -25,32 +25,24 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#ifndef V8_A64_DEBUGGER_A64_H_
|
| -#define V8_A64_DEBUGGER_A64_H_
|
| -
|
| -#if defined(USE_SIMULATOR)
|
| -
|
| -#include "globals.h"
|
| -#include "utils.h"
|
| -#include "a64/constants-a64.h"
|
| -#include "a64/simulator-a64.h"
|
| -
|
| -namespace v8 {
|
| -namespace internal {
|
| -
|
| -
|
| -class Debugger : public Simulator {
|
| - public:
|
| - Debugger(Decoder* decoder, FILE* stream = stderr)
|
| - : Simulator(decoder, NULL, stream) {}
|
| -
|
| - // Functions overloading.
|
| - void VisitException(Instruction* instr);
|
| -};
|
| -
|
| -
|
| -} } // namespace v8::internal
|
| -
|
| -#endif // USE_SIMULATOR
|
| -
|
| -#endif // V8_A64_DEBUGGER_A64_H_
|
| +// Flags: --harmony-maths
|
| +
|
| +assertEquals("Infinity", String(1/Math.sign(0)));
|
| +assertEquals("-Infinity", String(1/Math.sign(-0)));
|
| +assertEquals(1, Math.sign(100));
|
| +assertEquals(-1, Math.sign(-199));
|
| +assertEquals(1, Math.sign(100.1));
|
| +assertTrue(isNaN(Math.sign("abc")));
|
| +assertTrue(isNaN(Math.sign({})));
|
| +assertEquals(0, Math.sign([]));
|
| +assertEquals(1, Math.sign([1]));
|
| +assertEquals(-1, Math.sign([-100.1]));
|
| +assertTrue(isNaN(Math.sign([1, 1])));
|
| +assertEquals(1, Math.sign({ toString: function() { return "100"; } }));
|
| +assertEquals(1, Math.sign({ toString: function() { return 100; } }));
|
| +assertEquals(-1, Math.sign({ valueOf: function() { return -1.1; } }));
|
| +assertEquals(-1, Math.sign({ valueOf: function() { return "-1.1"; } }));
|
| +assertEquals(-1, Math.sign(-Infinity));
|
| +assertEquals(1, Math.sign(Infinity));
|
| +assertEquals(-1, Math.sign("-Infinity"));
|
| +assertEquals(1, Math.sign("Infinity"));
|
|
|