зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
12d1673629
Коммит
b242a1173d
|
@ -67,6 +67,21 @@ actual = testNum.toExponential(4);
|
|||
expect = '7.7123e+1';
|
||||
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.... ///////////////////////////////
|
||||
/*************************************************************************
|
||||
|
|
|
@ -67,6 +67,21 @@ actual = testNum.toPrecision(4);
|
|||
expect = '5.123';
|
||||
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.... ///////////////////////////////
|
||||
/*************************************************************************
|
||||
|
|
Загрузка…
Ссылка в новой задаче