bug 467276 - tests for NaN/Infinity.toExponential(...)/toPrecision() should not check range, by szegedia%freemail.hu. Sync with CVS trunk.

This commit is contained in:
Bob Clary 2009-01-14 07:16:18 -08:00
Родитель 12d1673629
Коммит b242a1173d
2 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -67,6 +67,21 @@ actual = testNum.toExponential(4);
expect = '7.7123e+1'; expect = '7.7123e+1';
captureThis(); captureThis();
status = 'Section B of test: Infinity.toExponential() with out-of-range fractionDigits';
actual = Number.POSITIVE_INFINITY.toExponential(-3);
expect = 'Infinity';
captureThis();
status = 'Section C of test: -Infinity.toExponential() with out-of-range fractionDigits';
actual = Number.NEGATIVE_INFINITY.toExponential(-3);
expect = '-Infinity';
captureThis();
status = 'Section D of test: NaN.toExponential() with out-of-range fractionDigits';
actual = Number.NaN.toExponential(-3);
expect = 'NaN';
captureThis();
/////////////////////////// OOPS.... /////////////////////////////// /////////////////////////// OOPS.... ///////////////////////////////
/************************************************************************* /*************************************************************************

Просмотреть файл

@ -67,6 +67,21 @@ actual = testNum.toPrecision(4);
expect = '5.123'; expect = '5.123';
captureThis(); captureThis();
status = 'Section B of test: Infinity.toPrecision() with out-of-range fractionDigits';
actual = Number.POSITIVE_INFINITY.toPrecision(-3);
expect = 'Infinity';
captureThis();
status = 'Section C of test: -Infinity.toPrecision() with out-of-range fractionDigits';
actual = Number.NEGATIVE_INFINITY.toPrecision(-3);
expect = '-Infinity';
captureThis();
status = 'Section D of test: NaN.toPrecision() with out-of-range fractionDigits';
actual = Number.NaN.toPrecision(-3);
expect = 'NaN';
captureThis();
/////////////////////////// OOPS.... /////////////////////////////// /////////////////////////// OOPS.... ///////////////////////////////
/************************************************************************* /*************************************************************************