Commit Graph

988 Commits

Author SHA1 Message Date
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] be82787a00
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 da3747003f Merge pull request #308 from bocoup/for-of-built-ins
Add tests for `for..of` iteration over built-ins
2015-06-25 14:43:53 -07:00
Brian Terlson 55740e93d6 Merge pull request #334 from arv/fix-math-precision
Fix issue with math_precision.js
2015-06-25 14:19:47 -07:00
Erik Arvidsson 96e5b67cd5 Fix issue with math_precision.js
It was missing vars which was causing issues with our test harness
since we run all the files in strict mode.
2015-06-25 16:43:10 -04:00
Brian Terlson c295916c09 Merge pull request #332 from bocoup/update-links
Update spec references to use canonical source
2015-06-24 18:56:14 -07:00
Mike Pennisi f424d5f37b Update spec references to use canonical source 2015-06-24 16:36:59 -04: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
Brian Terlson 134c484abb Merge pull request #330 from bocoup/correct-promise-test
Fix bugs in Promise tests
2015-06-23 17:14:28 -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 6231fe20a4 Re-write test body to match test description 2015-06-18 17:38:33 -04:00
Mike Pennisi fabf5f3320 Correct typo in test descriptions 2015-06-18 17:38:33 -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
Mike Pennisi cb617493d7 Update browser runner to honor `onlyStrict` flag
Unlike the console runner, the browser runner does not modify the
strictness of tests prior to running them. Regardless of a given test's
metadata, it runs every test exactly once, and it never enables strict
mode. This means that tests intended to function in strict mode must
declare the "use strict"; directive prologue in addition to the
`onlyStrict` flag.

For any test that specifies the `onlyStrict` metadata flag, transform
the source code by injecting a "use strict" directive prologue prior to
running the test.
2015-06-18 17:38:33 -04:00
Mike Pennisi 92a735dad7 Create distinct tests for arguments object types 2015-06-18 16:01:49 -04:00
Brian Terlson 12cc01484e Merge pull request #293 from yanlxu/Object-Assign
Add tests for Object-Assign
2015-06-18 15:58:27 -04:00
Mike Pennisi 03f8ca8336 Move `for-of` tests to appropriate directory 2015-06-18 15:53:24 -04:00
Mike Pennisi a321e87a2d Add tests for `for..of` iteration over built-ins 2015-06-18 15:53:19 -04:00
Brian Terlson 0164622232 Merge pull request #325 from bocoup/fix-browser
Update browser runner to inject `assert.js`
2015-06-18 15:39:37 -04:00
Mike Pennisi 73aa06275a Update browser runner to inject `assert.js`
Since the Python runner was updated to include `assert.js` in all tests
unconditionally, a number of tests have been written that implicitly
rely on its presence. The browser runner does not currently provide this
file's contents to these tests, so they fail unconditionally.

Update the browser runner to inject that file's contents into every test
context.

Note: the existing approach to file retrieval (namely loading via
synchronous XHR requests) is inefficient and deprecated in some
browsers. It is honored here for the sake of consistency and to minimize
the changeset necessary to fix the browser runner.
2015-06-18 13:53:09 -04:00
Yanli Xu 07b21a5e44 add tests for Object.assign 2015-06-18 15:23:15 +08:00
Brian Terlson 42d16da901 Merge pull request #286 from bocoup/obj-method-def
Add tests for MethodDefinition forms new to ES6
2015-06-17 19:56:29 -04:00
Brian Terlson e1500bff66 Merge pull request #322 from bocoup/remove-print
Remove $PRINT helper function
2015-06-17 19:54:58 -04:00
Brian Terlson a54793bf4b Merge pull request #324 from bocoup/fix-meta-data
Fix typo in test meta-data
2015-06-17 16:21:01 -04:00
Mike Pennisi 48dbddebdb Fix typo in test meta-data
The `Negative` tag accepts a string value (not a list)
2015-06-17 15:44:54 -04:00
Mike Pennisi 6863328f88 fixup! Introduce additional tests for ES6 templates
Include tests using arrow functions
2015-06-16 16:08:03 -04:00
Mike Pennisi e42f977122 fixup! Introduce additional tests for ES6 templates
Ensure test files assert the described behavior. Extend coverage to
strict and non-strict mode explicitly.
2015-06-16 15:10:09 -04:00
Mike Pennisi fe11a1ea1a Remove $PRINT helper function
The `$PRINT` helper function has no effect on test behavior. The
following tests use it to report assertion outcomes (and as a result
will fail silently):

- test/language/function-code/S10.2.1_A4_T2.js
- test/language/function-code/S10.2.1_A5.1_T1.js
- test/language/function-code/S10.2.1_A5.1_T2.js
- test/language/function-code/S10.2.1_A5.2_T1.js

Remove the function definition and all references within tests. Update
tests that use it as an error reporting mechanism to instead use an
appropriate `assert` helper function.
2015-06-16 13:43:23 -04:00
Brian Terlson f668e94b6f Merge pull request #318 from pvginkel/fill-is-es6
The Array.prototype.fill function is an ES6 function.
2015-06-16 13:31:23 -04:00
Brian Terlson 54de5fb509 Merge pull request #319 from pvginkel/missing-features
The Array.prototype.find function is an ES6 function.
2015-06-16 13:30:12 -04:00
Brian Terlson cd35655beb Merge pull request #317 from bocoup/es6-numeric-literals
ES6 numeric literals
2015-06-16 13:28:35 -04:00
Brian Terlson 15ad3c9cad Merge pull request #321 from bocoup/swallowed-assertions
Fix tautological pattern in tests
2015-06-16 13:19:32 -04:00
Mike Pennisi 57f3466cf7 Fix tautological pattern in tests
In neglecting to assert the type of error thrown (or that any error was
thrown at all), these tests cannot fail. Refactor the tests to use the
`assert.throws` helper method, which takes these details into
consideration.
2015-06-16 12:55:56 -04:00
Brian Terlson e4aac334b8 Merge pull request #282 from bocoup/Proxy
Add tests for Proxy
2015-06-16 11:18:57 -04:00
Leonardo Balter 2c4077c17a Proxy: construct 2015-06-15 22:37:59 -04:00
Leonardo Balter 450b830026 Proxy: apply 2015-06-15 22:37:59 -04:00
Leonardo Balter 3f214e715f Proxy: ownKeys 2015-06-15 22:37:58 -04:00
Leonardo Balter 28f9d8dbd2 Proxy: enumerate 2015-06-15 22:37:58 -04:00
Leonardo Balter d9edb3593a Proxy: deleteProperty 2015-06-15 22:37:58 -04:00
Leonardo Balter 99ca320b01 Proxy: set 2015-06-15 22:37:57 -04:00
Leonardo Balter 21a1fbe68e Proxy: get 2015-06-15 22:37:57 -04:00