From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../test262/ch11/11.5/11.5.3/S11.5.3_A4_T3.js | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 js/src/tests/test262/ch11/11.5/11.5.3/S11.5.3_A4_T3.js (limited to 'js/src/tests/test262/ch11/11.5/11.5.3/S11.5.3_A4_T3.js') diff --git a/js/src/tests/test262/ch11/11.5/11.5.3/S11.5.3_A4_T3.js b/js/src/tests/test262/ch11/11.5/11.5.3/S11.5.3_A4_T3.js new file mode 100644 index 000000000..5861cf727 --- /dev/null +++ b/js/src/tests/test262/ch11/11.5/11.5.3/S11.5.3_A4_T3.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics + * + * @path ch11/11.5/11.5.3/S11.5.3_A4_T3.js + * @description If the dividend is an infinity results is NaN + */ + +//CHECK#1 +if (isNaN(Number.NEGATIVE_INFINITY % Number.POSITIVE_INFINITY) !== true) { + $ERROR('#1: -Infinity % Infinity === Not-a-Number. Actual: ' + (-Infinity % Infinity)); +} + +//CHECK#2 +if (isNaN(Number.NEGATIVE_INFINITY % Number.NEGATIVE_INFINITY) !== true) { + $ERROR('#2: -Infinity % -Infinity === Not-a-Number. Actual: ' + (-Infinity % -Infinity)); +} + +//CHECK#3 +if (isNaN(Number.POSITIVE_INFINITY % Number.POSITIVE_INFINITY) !== true) { + $ERROR('#3: Infinity % Infinity === Not-a-Number. Actual: ' + (Infinity % Infinity)); +} + +//CHECK#4 +if (isNaN(Number.POSITIVE_INFINITY % Number.NEGATIVE_INFINITY) !== true) { + $ERROR('#4: Infinity % -Infinity === Not-a-Number. Actual: ' + (Infinity % -Infinity)); +} + +//CHECK#5 +if (isNaN(Number.NEGATIVE_INFINITY % 1) !== true) { + $ERROR('#5: Infinity % 1 === Not-a-Number. Actual: ' + (Infinity % 1)); +} + +//CHECK#6 +if (isNaN(Number.NEGATIVE_INFINITY % -1) !== true) { + $ERROR('#6: -Infinity % -1 === Not-a-Number. Actual: ' + (-Infinity % -1)); +} + +//CHECK#7 +if (isNaN(Number.POSITIVE_INFINITY % 1) !== true) { + $ERROR('#7: Infinity % 1 === Not-a-Number. Actual: ' + (Infinity % 1)); +} + +//CHECK#8 +if (isNaN(Number.POSITIVE_INFINITY % -1) !== true) { + $ERROR('#8: Infinity % -1 === Not-a-Number. Actual: ' + (Infinity % -1)); +} + +//CHECK#9 +if (isNaN(Number.NEGATIVE_INFINITY % Number.MAX_VALUE) !== true) { + $ERROR('#9: Infinity % Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % Number.MAX_VALUE)); +} + +//CHECK#10 +if (isNaN(Number.NEGATIVE_INFINITY % -Number.MAX_VALUE) !== true) { + $ERROR('#10: -Infinity % -Number.MAX_VALUE === Not-a-Number. Actual: ' + (-Infinity % -Number.MAX_VALUE)); +} + +//CHECK#11 +if (isNaN(Number.POSITIVE_INFINITY % Number.MAX_VALUE) !== true) { + $ERROR('#11: Infinity % Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % Number.MAX_VALUE)); +} + +//CHECK#12 +if (isNaN(Number.POSITIVE_INFINITY % -Number.MAX_VALUE) !== true) { + $ERROR('#12: Infinity % -Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % -Number.MAX_VALUE)); +} + -- cgit v1.2.3