2133 Commits

Author SHA1 Message Date
Leonardo Balter
57b7d13781 String.fromCodePoint 2015-07-10 14:30:27 -04:00
André Bargull
a57d2736e3 Add additional tests for valid and invalid identity escapes 2015-07-10 20:18:14 +02:00
Mike Pennisi
10e0d977ec Prefer explicit error checking where possible
The `negative` frontmatter tag expresses an expectation for the behavior
of the test file as a whole. The `assert.throws` helper function offers
more fine-grained control over expectations because it may be applied to
specific statements and expressions. This makes it preferable in cases
where it may be used (i.e. when the test body does not describe a syntax
error or early error).

Re-implement assertions for errors to use the `assert.throws` helper
function wherever possible.
2015-07-10 14:12:57 -04:00
Mike Pennisi
104025d6d2 Move tests for the FunctionPrototype intrinsic
Test262 maintains most tests for the FunctionPrototype intrinsic within
the `test/built-ins/Function/prototype/` directory. Two tests are
defined within the otherwise-empty `test/built-ins/intrinsics/`
directory; relocate them to the canonical directory for consistency and
discoverability.
2015-07-10 10:51:30 -04:00
Brian Terlson
1bc6441cae Merge pull request #356 from anba/regexp-cleanup
Clean-up test comments and remove invalid tests
2015-07-09 16:45:55 -07:00
Brian Terlson
4181994b55 Merge pull request #353 from bocoup/accessor-functions-on-built-in-properties
Add test for built-in accessor properties names
2015-07-09 16:37:51 -07:00
Mike Pennisi
03e862ee14 Re-organize generator tests
The `test/language/generators/` directory contained a single file that
concerned generators derived both from syntactic form and from a
built-in function.

Refactor this test into two files and place each in the appropriate
directory.
2015-07-09 15:07:19 -04:00
Mike Pennisi
2bb1003ab1 Extend test coverage for Promise built-in 2015-07-08 14:08:24 -04:00
André Bargull
ebab7cf055 Clean-up test comments and remove invalid tests
- 15.10.2.15-3-1 and 15.10.2.15-3-2 are both invalid (U+002F (SOLIDUS) instead of U+005C (REVERSE SOLIDUS) was used to start an escape sequence).
- 15.10.4.1-2 and 15.10.2.2-1 are identical tests, delete the latter.
- Update tests to avoid using runTestCase() function.
- Update multiple test infos to point to correct algorithm step (CharacterRange step 6 instead of step 1).
2015-07-08 19:01:22 +02:00
André Bargull
a4205bac61 B.1.4 extensions are not allowed for Unicode RegExps 2015-07-08 17:19:59 +02:00
Brian Terlson
f4e17963f8 Merge pull request #343 from bocoup/MapIteratorPrototype
Fix, update and improve coverage of MapIteratorPrototype
2015-07-07 14:37:40 -05:00
Brian Terlson
668219cd9e Merge pull request #331 from bocoup/promise-formalize
Formalize tests for built-in Promise methods
2015-07-07 14:35:51 -05:00
Mike Pennisi
4e2f350875 Formalize tests for built-in Promise methods
Uniformly and exhaustively test the generic aspects of the static- and
instance Promise methods, including:

- function `length` properties
- function `name` properties
- method property descriptors
2015-07-07 13:55:57 -04:00
Mike Pennisi
a3081bd108 Remove redundant test 2015-07-07 13:55:57 -04:00
Leonardo Balter
0597e9e90e Remove duplicated Map tests 2015-07-07 12:03:55 -04:00
Leonardo Balter
7d0c8638c6 Map.prototype[Symbol.toStringTag] 2015-07-07 12:03:55 -04:00
Leonardo Balter
710fcbb383 Map.prototype[Symbol.iterator] 2015-07-07 12:03:54 -04:00
Leonardo Balter
cdcd91c8b2 Map.prototype.values 2015-07-07 12:03:54 -04:00
Leonardo Balter
1ddb99eebd Map.prototype.size 2015-07-07 12:03:54 -04:00
Leonardo Balter
7ee11aae4e Map.prototype.set 2015-07-07 12:03:54 -04:00
Leonardo Balter
48f4131007 Map.prototype.keys 2015-07-07 12:03:53 -04:00
Leonardo Balter
dc55c21084 Map.prototype.has 2015-07-07 12:03:53 -04:00
Leonardo Balter
b103418a17 Map.prototype.get 2015-07-07 12:03:53 -04:00
Leonardo Balter
a31a62fcc8 Map.property.forEach 2015-07-07 12:03:53 -04:00
Leonardo Balter
ad60436658 Map.prototype.entries 2015-07-07 12:03:53 -04:00
Leonardo Balter
e345635a75 Map.prototype.delete 2015-07-07 12:03:52 -04:00
Leonardo Balter
66c08508ae Map.prototype.constructor 2015-07-07 12:03:52 -04:00
Leonardo Balter
b1557df8ef Map.prototype.clear 2015-07-07 12:03:52 -04:00
Leonardo Balter
ded4923d27 Map.prototype descriptor 2015-07-07 12:03:52 -04:00
Leonardo Balter
a55385c716 Map constructor 2015-07-07 12:03:52 -04:00
Leonardo Balter
22097eeaf4 fixup
- move Object.prototype.__proto__ tests to annexB
- remove RegExp.prototype.unicode name test
2015-07-06 17:50:33 -04:00
Leonardo Balter
a1de508783 Add test for built-in accessor properties names
Including:

- 21.2.4.2 get RegExp [ @@species ]
- 21.2.5.3 get RegExp.prototype.flags
- 21.2.5.4 get RegExp.prototype.global
- 21.2.5.5 get RegExp.prototype.ignoreCase
- 21.2.5.7 get RegExp.prototype.multiline
- 21.2.5.10 get RegExp.prototype.source
- 21.2.5.12 get RegExp.prototype.sticky
- 21.2.5.15 get RegExp.prototype.unicode
- 22.1.2.5 get Array [ @@species ]
- 23.1.2.2 get Map [ @@species ]
- 23.2.2.2 get Set [ @@species ]
- 24.1.3.3 get ArrayBuffer [ @@species ]
- 24.1.4.1 get ArrayBuffer.prototype.byteLength
- 24.2.4.1 get DataView.prototype.buffer
- 24.2.4.2 get DataView.prototype.byteLength
- 24.2.4.3 get DataView.prototype.byteOffset
- 25.4.4.6 get Promise [ @@species ]
- B.2.2.1.1 get Object.prototype.__proto__
- B.2.2.1.2 set Object.prototype.__proto__

Skipped TypedArray tests in order to avoid an early test strategy definition for them.
2015-07-06 17:31:23 -04:00
Pieter van Ginkel
ad1f14c247 ES6 specific functions should declare a feature.
The String.endsWith and String.includes tests didn't specify either an es6id or a features. Added a features attribute for these tests.
2015-07-05 15:54:28 +02:00
Leonardo Balter
7cbf7654e5 Improve coverage of MapIteratorPrototype 2015-07-02 10:42:41 -04:00
Pieter van Ginkel
a5e4c2ade5 Fixed invalid configuration block delimiters.
Two tests started the configuration block with a /*-- instead of a /*---.
2015-06-28 07:35:54 +02:00
Brian Terlson
9dc49b72cc Merge pull request #336 from bocoup/remove-env
Remove empty "include" file
2015-06-26 10:57:59 -07:00
Mike Pennisi
e57da7a8f1 Remove empty "include" file
The `environment.js` file has been empty since its initial introduction
to this project [1]. It has no effect on any of the contexts in which it
is currently referenced, so it may be safely removed.

[1] be82787a00f8b2de474e1bfb29d65d04af72255f
2015-06-26 12:19:51 -04:00
Brian Terlson
f06791ea4b Merge pull request #328 from bocoup/object-set-prototype-of
Add tests for Object.setPrototypeOf
2015-06-25 14:46:43 -07:00
Brian Terlson
e4a25da86a Merge pull request #305 from jugglinmike/browser-only-strict
Update browser runner to honor `onlyStrict` flag
2015-06-25 14:44:34 -07:00
Brian Terlson
afd6450bd2 Merge pull request #327 from bocoup/object-assign-extensions
Extend coverage for Object.assign
2015-06-23 17:48:49 -07:00
Brian Terlson
ddc687d0cb Merge pull request #320 from bocoup/WeakSet
Add tests for WeakSet
2015-06-23 17:41:19 -07:00
Mike Pennisi
ad064a631c fixup! Fix bug in test 2015-06-23 13:42:19 -04:00
Mike Pennisi
5e8b276bf5 fixup! Fix bug in test 2015-06-23 12:03:09 -04:00
Mike Pennisi
6f2feb0157 Fix bug in test
This test's description concerns the behavior of `Promise.all` when the
IteratorStep abstract operation fails due to an abrupt completion
returned by the iterator's `next` method. The test body did not actually
assert that functionality.

Update the test body to correctly define the requisite iterator and
assert that the specific error created is the one thrown from the
invocation of `Promise.all`
2015-06-23 10:30:01 -04:00
Mike Pennisi
3fb882acd0 Add tests for Object.setPrototypeOf 2015-06-19 12:13:28 -04:00
Mike Pennisi
39cd09f7a8 Extend coverage for Object.assign 2015-06-19 10:38:22 -04:00
Mike Pennisi
29ecced632 Update handling of directive prologues
Some tests specifically concern the application of the `use strict`
directive as it appears in JavaScript source code. These tests should
*not* be run with the `onlyStrict` flag because relying on the test
runner to enable strict mode makes the semantics of the source code
irrelevant. Update these tests to use the `noStrict` flag.

Other tests concern language semantics that are only valid in strict
mode, but the mechanism for enabling strictness is inconseqential.
Update these tests to use the `onlyStrict` flag and remove any redundant
`use strict` directive prologues contained within.

Still other tests are valid both within and outside of strict mode.
In keeping with the majority of other tests, do not specify any
restrictions on the environments in which these tests may be run.
2015-06-18 17:38:34 -04:00
Mike Pennisi
41c8717b3e Correct test description 2015-06-18 17:38:33 -04:00
Mike Pennisi
21d1fc5309 Remove invalid test 2015-06-18 17:38:33 -04:00
Mike Pennisi
ef1fddd533 Fix invalid tests 2015-06-18 17:38:33 -04:00