diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Math/pow/applying-the-exp-operator_A7.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Math/pow/applying-the-exp-operator_A7.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Math/pow/applying-the-exp-operator_A7.js b/js/src/tests/test262/built-ins/Math/pow/applying-the-exp-operator_A7.js new file mode 100644 index 0000000000..c741bdbe60 --- /dev/null +++ b/js/src/tests/test262/built-ins/Math/pow/applying-the-exp-operator_A7.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: If abs(base) is 1 and exponent is +∞, the result is NaN. +esid: sec-applying-the-exp-operator +---*/ + + +var exponent = +Infinity; +var base = new Array(); +base[0] = -1; +base[1] = 1 +var basenum = 2; + +for (var i = 0; i < basenum; i++) { + assert.sameValue( + Math.pow(base[i], exponent), + NaN, + "(" + base[i] + ", " + exponent + ")" + ); +} + +reportCompare(0, 0); |