Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/division/S11.5.2_A4_T3.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: |
6 The result of division is determined by the specification of IEEE 754
7 arithmetics
8 es5id: 11.5.2_A4_T3
9 description: >
10 Division of an infinity by a zero results in an infinity of
11 appropriate sign
12 ---*/
13
14 //CHECK#1
15 if (Number.NEGATIVE_INFINITY / 0 !== Number.NEGATIVE_INFINITY) {
16 $ERROR('#1: Infinity / 0 === Infinity. Actual: ' + (Infinity / 0));
17 }
18
19 //CHECK#2
20 if (Number.NEGATIVE_INFINITY / -0 !== Number.POSITIVE_INFINITY) {
21 $ERROR('#2: -Infinity / -0 === Infinity. Actual: ' + (-Infinity / -0));
22 }
23
24 //CHECK#3
25 if (Number.POSITIVE_INFINITY / 0 !== Number.POSITIVE_INFINITY) {
26 $ERROR('#3: Infinity / 0 === Infinity. Actual: ' + (Infinity / 0));
27 }
28
29 //CHECK#4
30 if (Number.POSITIVE_INFINITY / -0 !== Number.NEGATIVE_INFINITY) {
31 $ERROR('#4: Infinity / -0 === -Infinity. Actual: ' + (Infinity / -0));
32 }