applying-the-exp-operator_A13.js (613B)
1 // Copyright 2016 Rick Waldron. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-applying-the-exp-operator 6 description: If base is −∞ and exponent > 0 and exponent is an odd integer, the result is −∞. 7 features: [exponentiation] 8 ---*/ 9 10 11 var base = -Infinity; 12 var exponents = []; 13 exponents[0] = 1; 14 exponents[1] = 111; 15 exponents[2] = 111111; 16 17 for (var i = 0; i < exponents.length; i++) { 18 if ((base ** exponents[i]) !== -Infinity) { 19 throw new Test262Error("(" + base + " ** " + exponents[i] + ") !== -Infinity"); 20 } 21 } 22 23 reportCompare(0, 0);