64 Commits

Author SHA1 Message Date
Leo Balter
ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Caio Lima
1dc78879d4 Add edge tests to verify BigInt to Number conversion when BigInt can't directly be represented by a Number. 2019-07-19 13:53:01 -04:00
Leo Balter
ac55e29ed0 Fix yaml consistency 2018-03-06 14:36:02 -05:00
Rick Waldron
9a211b1c9f built-ins/Number/*: make all indentation consistent (depth & character) (#1436) 2018-02-15 15:11:50 -05:00
André Bargull
f95b56ab28 Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722d088055a7d84d8c691ddd7109edb34.
2018-02-09 12:09:47 -05:00
Rick Waldron
a01de4a722 js-beautify: make all indentation consistent (depth & character) (#1409) 2018-02-09 11:35:37 -05:00
Leo Balter
6d5a7adf4e Fix ToNumber operations 2018-02-08 11:13:54 -05:00
Leo Balter
53c00784b6 Revert "Revert "Tests for NumericSeparatorLiteral. Closes gh-1051" (#1188)"
This reverts commit 8422147c17aa3f4061e524a8f88c251a3b371ecf.
2018-02-08 11:13:54 -05:00
André Bargull
f717982c94 Remove unused includes 2018-01-25 13:59:37 -05:00
Rick Waldron
02f1a0b630 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:50:00 -05:00
Ivan Vyshnevskyi
7b868091a7 Add ToNumber tests for invalid HexIntegralLiterals 2018-01-05 12:48:57 -05:00
Ivan Vyshnevskyi
d540256163 Add more ToNumber tests for invalid binary and octal literals 2018-01-05 12:48:57 -05:00
Rick Waldron
92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Leo Balter
60782de95e Tag tests for U+180E and complete coverage for RegExp matching 2017-09-25 15:27:59 -04:00
Leo Balter
7cbbe51216 Add cross-realm feature 2017-09-22 15:29:10 -04:00
Robin Templeton
37beb36524
add BigInt tests 2017-08-24 15:58:14 -04:00
Leo Balter
8422147c17 Revert "Tests for NumericSeparatorLiteral. Closes gh-1051" (#1188) 2017-08-21 11:54:21 -04:00
Rick Waldron
9380826d5b Tests for NumericSeparatorLiteral, Number(...) 2017-08-17 09:50:33 -04:00
Daniel Ehrenberg
e2ee94f452 Fix tests for toFixed and toExponential (#1080)
toExponential had a typo, and toFixed was against an earlier version
of the specification proposal. The tests pass against a version of V8
which attempts to implement the new spec.
2017-06-28 10:29:47 -04:00
Daniel Ehrenberg
0314c87b08 Add tests for Number printing precision ranges (#932)
These tests are against the needs-consensus pull request at
https://github.com/tc39/ecma262/pull/857
2017-06-12 20:10:15 -03:00
André Bargull
d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Daniel Ehrenberg
73c2d51734
Fix toFixed test to invoke toString() properly 2017-04-06 19:40:22 -04:00
Daniel Ehrenberg
e9a745646a Test for the difference between toFixed and toString
This test comes from a note in the specification under toFixed.
It fails in ChakraCore and passes in other engines that I tested.
2017-03-23 19:05:32 +01:00
Rick Waldron
fdd2fa9b1c Rename $ => $262. Fixes gh-802 (#823)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-03-01 16:34:15 -05:00
Michael "Z" Goddard
ced9bfd7be Test that Number.prototype.toFixed.length is 1 (#826)
Add a test to confirm that the length member of
Number.prototype.toFixed is 1.
2017-01-19 22:33:53 -05:00
K. Adam White
182e0dee7b Remove es6id line per PR review 2017-01-19 14:51:57 -05:00
K. Adam White
5d69e30929 Add Number.prototype.toFixed return value test
Adds a test to ensure that toFixed returns a string value
2017-01-19 14:51:57 -05:00
jugglinmike
71e573f7da Add tests for realm interactions (#688)
* Add tests for prototype realm inference

* Add tests for miscellaneous realm concerns

* Add tests for realm of spec-created Errors

In some cases, Error objects produced by the specification are
observable from ECMAScript code. Among these cases, some are further
differentiated in that they occur outside of any built-in function and
may be triggered through syntactic production directly. The current
realm record is commonly interpreted incorrectly under these
circumstances.

Add tests asserting that the expected realm record is used when
constructing such Error objects.

* Add tests for realm use in ArraySpeciesCreate

* Add tests for function realm retrieval

* Add tests for cross-realm behaviors of Symbols

* Add tests for GetValue and PutValue

* Add tests for realm of spec-created Arrays

In some cases, Arrays produced by CreateArrayFromList are observable
from ECMAScript code. Among these cases, two occur outside of any
built-in function and may be triggered through syntactic production
directly. The current realm record is commonly interpreted incorrectly
under these circumstances.

Add tests asserting that the expected realm record is used when
constructing arrays.

* Add test for spec-created object

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for prototype realm inference

* fixup! Add tests for miscellaneous realm concerns
2016-10-24 10:43:17 -07:00
Viktor
29c2384449 Update return-values.js (Number#toExponential bug in Firefox) (#751)
Update test cases for Number#toExponential

Includes test cases addressing a known bug on Firefox 48.

Ref https://bugzilla.mozilla.org/show_bug.cgi?id=944846
2016-08-29 17:33:55 -04:00
Leo Balter
3275f17cd4 Add tests for Number#toExponential (#664)
* Add tests for Number#toExponential
2016-07-21 10:57:05 -07:00
Mathias Bynens
3a5a09eba2 Ensure U+180E is no longer considered whitespace
Ref. https://hashseed.blogspot.com/2014/08/in-ecma-262-5.html
Ref. https://github.com/tc39/ecma262/pull/300#issuecomment-181376767
Ref. 9b10d2a597

Fix and add @anba’s U+180E tests
2016-07-06 10:11:32 -04:00
Leo Balter
e49d2661a8 Improve assertions comparing values to NaN (#690)
The global isNaN is not precise at all, and Number.isNaN is an ES6 feature that makes it preferrable to use assert's sameValue for NaN values, as it handles it internally using the comparison.
2016-07-01 11:22:55 -07:00
Leonardo Balter
1eaae52eb8 Add prop-desc tests for Number.prototype properties 2016-06-23 14:42:40 -04:00
Leonardo Balter
4dd7e5aa4b Extend Number tests to assert abrupt completions 2016-06-23 14:42:40 -04:00
Leonardo Balter
9223f56344 Update and add basic prop-desc tests for Number
and Number.prototype
2016-06-23 14:42:40 -04:00
Leonardo Balter
8066b9ecaf Add tests for Number.{parseFloat,parseInt} 2016-06-23 14:42:39 -04:00
Leonardo Balter
47f806ecef Update tests for Number.NaN 2016-06-23 14:42:39 -04:00
Leonardo Balter
4492b8032b Add tests for Number.isSafeInteger 2016-06-23 14:42:39 -04:00
Leonardo Balter
3685e6b7b3 Update and add tests for Number.isNaN 2016-06-23 14:42:39 -04:00
Leonardo Balter
c246bc7d09 Add tests for Number.isInteger 2016-06-23 14:42:39 -04:00
Leonardo Balter
46d8c3d6b8 Add tests for Number.isFinite 2016-06-23 14:42:39 -04:00
Leonardo Balter
454b8f10b8 Update and add tests for Number.POSITIVE_INFINITY 2016-06-23 14:42:39 -04:00
Leonardo Balter
7e55e54538 Update and add tests for Number.NEGATIVE_INFINITY 2016-06-23 14:42:39 -04:00
Leonardo Balter
36909a0595 Add tests for Number.EPSILON 2016-06-23 14:42:38 -04:00
Leonardo Balter
813bb5166c
Remove precision-equivalency tests
Due to specs approximation values, some tests are invalid as the harness
helpers rely on another approximated values as Math.LN2.
2016-06-20 17:44:11 -04:00
Leonardo Balter
60e61a15e0 Add tests for Number#toPrecision 2016-06-15 17:59:12 -04:00
Mike Pennisi
f7aa31b41f Remove over-specified tests
Except for a small set of expected input/output pairs, both ES5 and
ES2015 define the expected return value of these methods in terms of an
"implementation-dependent approximation." This makes it inappropriate to
enforce expectations for specific values, even if expressed imprecisely.
2016-04-18 14:36:49 -04:00
Mike Pennisi
cb19235ba4 Add tests for Number.{MAX,MIN}_SAFE_INTEGER 2016-03-09 12:21:29 -05:00
André Bargull
ca61d9b876 Add missing tests for "length" and "name" properties of built-in functions
Note: Already uses the updated DataView function lengths from tc39/ecma262#266 (ES2016 Draft 2015-12-20)
2016-01-15 18:12:05 +01:00
André Bargull
1da4c78051 Revert primitive wrapper prototypes and String#split to ES5
- Revert Number, Boolean and String prototypes to ES5 semantics
- Revert String.prototype.split's to ES5 behavior
2015-11-06 18:50:44 +01:00