Commit Graph

751 Commits

Author SHA1 Message Date
Brian Terlson 32edc4873e Merge pull request #300 from bocoup/modules-early-errors
Add tests for early errors in module syntax
2015-06-08 12:20:20 -07:00
Brian Terlson a47916e6ec Merge pull request #288 from bocoup/for-of-additions
for..of additions
2015-06-08 12:18:34 -07:00
Brian Terlson 0146a1797e Merge pull request #304 from pvginkel/missing-generators
Generator test should specify generators feature.
2015-06-08 11:40:45 -07:00
Pieter van Ginkel 44ee5c85ea Generator test should specify generators feature. 2015-06-05 12:34:39 +02:00
Mike Pennisi b8b462316b Add tests for early errors in module syntax
Introduce the `module` flag to unambiguously identify tests that are
intended to be interpreted as module code.
2015-06-03 13:15:15 -04:00
Brian Terlson 21b739f1dc Merge pull request #289 from bocoup/contributing-md
Update contribution guidelines
2015-06-03 10:36:37 -05:00
Mike Pennisi 4e4ea1145b Update contribution guidelines
- Remove trailing white space
- Streamline documentation of test tags
- Do not reference obsolete tags
- Document `features` frontmatter tag
- Document `es6id` frontmatter tag
- Omit unnecessary detail about test262 website generation. This is not
  directly useful to potential test contributors. Implementation details
  like these can be taken for granted by that audience.
- Remove documentation on YAML syntax. Details on YAML may be helpful
  for some new contributors, but this document should not attempt to
  cover the topic (especially not from the description of a specific
  frontmatter entry). Replace with a link to a more comprehensive source
  as this will be more generally useful to those who need it (and less
  obtrusive for those who do not).
- Consolidate information on test helpers
- Document `assert` helpers
- Update instructions for asserting errors. Since the introduction of
  `assert.throws` in gh-22, the preferred means of expressing
  expectations regarding errors has changed. Update the CONTRIBUTING.md
  file to reflect the latest approach. Explain purpose of `throw
  NotEarlyError;` in example test.
- Re-order information on file names. The inconsistency in the project's
  file names should not go unmentioned, but neither should it not
  preceed instructions for the accepted approach to namine tests.
- More clearly document required frontmatter tags. Explicitly list
  `description` as a required frontmatter tag, implicitly identifying
  all other tags as optional.
2015-06-03 11:18:17 -04:00
Brian Terlson 991817bb48 Merge pull request #267 from bocoup/destructuring-assignment
Add tests for destructuring assignment
2015-06-03 10:13:16 -05:00
Brian Terlson 918cf1bb1c Merge pull request #292 from pvginkel/master
Add tests for variable instantiation for eval in strict mode
2015-06-03 10:10:05 -05:00
Mike Pennisi 69b89d85b3 Add tests for destructuring assignment 2015-06-03 10:46:51 -04:00
Brian Terlson 23b997dce0 Merge pull request #287 from bocoup/generator-prototype
Extend coverage for GeneratorPrototype methods
2015-06-02 20:20:54 -05:00
Brian Terlson 3b6953a3b4 Merge pull request #285 from anba/for-in-undefined
Additional tests with incorrect for-in context
2015-06-02 20:19:19 -05:00
Brian Terlson 546e594867 Merge pull request #284 from bocoup/iteration-restructuring
Iteration restructuring
2015-06-02 20:18:25 -05:00
Brian Terlson afb994a4cb Merge pull request #274 from anba/arguments-nonconfigurable
MOP operations on non-configurable arguments-object property
2015-06-02 19:10:11 -05:00
Brian Terlson f41d108840 Merge pull request #275 from anba/increment-reference
Increment/Decrement with property accessor expression
2015-06-02 19:09:33 -05:00
Brian Terlson b3e9752b30 Merge pull request #273 from anba/assignment-reference
Assignment with left-hand side property accessor
2015-06-02 19:09:28 -05:00
Brian Terlson 5cf31937cc Merge pull request #294 from ljharb/promise_method_enumerability
`Promise` methods should not be enumerable
2015-06-02 18:56:49 -05:00
Jordan Harband 00fb43009a Promise methods should not be enumerable, per https://people.mozilla.org/~jorendorff/es6-draft.html#table-4 2015-06-01 17:26:59 -07:00
Pieter van Ginkel 6883892d32 Add tests for variable instantiation for eval in strict mode
Test case 10.4.2-3-c-2-s verifies that eval can't instantiate variables in the calling context. However, it does not verify that the variable isn't matched to the global context either. Added test case 10.4.2-3-c-3-s to check for this.
2015-05-30 09:24:33 +02:00
Mike Pennisi c541cc4336 Increase coverage for for..of iteration 2015-05-27 15:14:51 -04:00
Mike Pennisi 0900ac0ae8 Annotate tests with required features 2015-05-27 11:36:10 -04:00
Mike Pennisi 19e6755f61 Correct test frontmatter 2015-05-26 17:31:34 -04:00
Mike Pennisi 1b03d842ac Add tests for GeneratorPrototype#return
Implement tests according to the pattern defined by the existing tests
for `GeneratorPrototype#throw`.
2015-05-26 13:47:58 -04:00
André Bargull 3987990563 Additional tests with incorrect for-in context
- Add missing ".prototype" lookup in Array.prototype tests (Follow-up of #280)
- Add noStrict flag in global/S10.2.3_A2.2_*.js (implicit this-binding is part of the test)
- Provide correct this-binding in function/13.2-*.js
- Add missing assert.throws in "set-iterator-close-after-add-failure.js"
2015-05-26 17:52:52 +02:00
Mike Pennisi e0387bcee8 Refactor tests for built-in @@iterator methods
Assert the value of the properties and update the test frontmatter to
include the `Symbol.iterator` feature.
2015-05-26 11:39:20 -04:00
Mike Pennisi eefc23df50 Move tests for iterator prototype methods
Define tests for intrinsic Iterators under the appropriate subdirectory
of `built-ins`.
2015-05-26 11:39:19 -04:00
Brian Terlson 527644d211 Merge pull request #283 from bocoup/contribution-information
Update contribution information
2015-05-25 20:23:08 -07:00
Mike Pennisi 7c4b2e9ef5 Update contribution information
Test262 now accepts community contributions. Update the copy on the
website to reflect this.
2015-05-25 17:41:13 -04:00
Mike Pennisi 099d10cb34 Remove extraneous invocation 2015-05-25 16:51:36 -04:00
Mike Pennisi a2e1fc713e Correct test
As written, the test behavior and description do not match--the
`throw` invocation takes place while generator execution is paused
*within* the `finally` block (not following it).

Ensure that the test exercises the described behavior (and remove
extraneous invocation of method under test).
2015-05-25 16:51:35 -04:00
Mike Pennisi ef5594b675 Correct test
As written, the test behavior and description do not match--the `throw`
invocation takes place while generator execution is paused *within* the
`try..catch` statement (not following it).

Ensure that the test exercises the described behavior (and remove
extraneous invocation of method under test).
2015-05-25 16:51:35 -04:00
Mike Pennisi 332c4dab05 Correct typos in test description 2015-05-25 16:51:35 -04:00
Mike Pennisi a62932fc42 Move test file to more appropriate directory 2015-05-25 16:51:35 -04:00
Brian Terlson 5341ad5985 Merge pull request #279 from bocoup/case-sensitive
fix case sensitive filenames
2015-05-24 14:38:13 -07:00
Brian Terlson 0360d749d2 Merge pull request #280 from pvginkel/master
S15.4.4.4_A4.1 length enumerable should be checked on Array.prototype.concat
2015-05-24 14:17:37 -07:00
Pieter van Ginkel 3663302c21 S15.4.4.4_A4.1 length enumerable should be checked on Array.prototype.concat
The test checks Array.concat which is undefined; instead it should check Array.prototype.concat.
2015-05-24 07:59:47 +02:00
Leonardo Balter 479ba6532d fix case sensitive filenames 2015-05-22 10:56:34 -04:00
André Bargull eace19ef91 Check for intended semantics 2015-05-20 22:13:17 +02:00
André Bargull ab6809cf47 Remove assert.js includes. 2015-05-20 22:12:31 +02:00
Brian Terlson 9861dc2dd1 Merge pull request #277 from bocoup/shorthand-properties
Add tests for IdentifierReference as property
2015-05-20 13:12:24 -07:00
Mike Pennisi 202ed9ee1d Add tests for IdentifierReference as property
From the ES6 specification:

> ## PropertyDefinition : IdentifierReference
>
> 1. Let propName be StringValue of IdentifierReference.
> 2. Let exprValue be the result of evaluating IdentifierReference.
> 3. ReturnIfAbrupt(exprValue).
> 4. Let propValue be GetValue(exprValue).
> 5. ReturnIfAbrupt(propValue).
> 6. Assert: enumerable is true.
> 7. Return CreateDataPropertyOrThrow(object, propName, propValue).
2015-05-20 16:08:40 -04:00
Rick Waldron bf3989be55 Merge pull request #241 from bocoup/set
23.2 Set Objects
2015-05-19 12:49:47 -04:00
Rick Waldron 6b3585451a 23.2 Set Objects
commit c56030aea7b3e43f46dbbc2b52859ca275cff226
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Thu Apr 30 15:17:44 2015 -0400

    Fix nits

commit 9b341022a9fd5a295ce85b630886dae10e10b653
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Tue Apr 28 13:52:04 2015 -0400

    Wrap expected construct failure in assert.throws

commit 9ef7e1c0499a99b15c64bb480dbfa41433cf9804
Author: Mike Pennisi <mike@mikepennisi.com>
Date:   Fri Apr 24 13:46:02 2015 -0400

    Introduce addition tests for the Set constructor

commit bd54cccf4a599c123fae5c97782f5562cd9da8a0
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Fri Apr 24 15:11:19 2015 -0400

    23.2 Set Objects, additions

commit 970e2ca95879161a8bb124ec712f7333fdea6798
Author: Rick Waldron <waldron.rick@gmail.com>
Date:   Tue Apr 21 12:44:41 2015 -0400

    23.2 Set Objects
2015-05-19 12:48:52 -04:00
André Bargull af1ef75ffc Split in multiple files 2015-05-19 17:50:41 +02:00
André Bargull c1e1c56dc0 Increment/Decrement with property accessor expression
The increment/decrement operator evaluates its operand expression once. When
the operand expression is a property accessor, RequireObjectCoercible
and ToPropertyKey are called on the property accessor in the correct order.
2015-05-19 17:46:34 +02:00
Brian Terlson cd53869494 Merge pull request #272 from anba/no-strict-tests
Enable strict mode for more built-in tests
2015-05-18 14:28:06 -07:00
Brian Terlson cc2278cbb1 Merge pull request #271 from bterlson/better-negative-length
Use a very negative number so ES5 implementations don't loop forever
2015-05-18 12:58:09 -07:00
André Bargull cd3829627d MOP operations on non-configurable arguments-object property
Mapped arguments property is changed to non-configurable. Check
arguments mapping works correctly when applying various MOP
methods.
2015-05-18 18:30:36 +02:00
André Bargull c5e18d561c Assignment with left-hand side property accessor
The assignment operator evaluates its operands from left to right. When
the left-hand side expression is a property accessor, RequireObjectCoercible
and ToPropertyKey are called on the property accessor before the right-hand
side expression is evaluated.
2015-05-18 18:12:25 +02:00
André Bargull 56036e4064 Enable strict mode for more built-in tests
- Remove no longer needed noStrict flags.
- Change tests to use propertyHelper.js for strict mode compatibility.
- Add tests for return value of `delete` operator, e.g. `delete Array.prototype === false`.
- Add non-writable tests for global NaN property.
- Split some tests to run in strict mode.
- Change tests with global `var length` declaration to use a different variable name for browser environments.
- Merge duplicated tests symbol-data-property-configurable-non-strict and symbol-data-property-configurable-strict.
- Merge duplicated tests symbol-data-property-writable-non-strict and symbol-data-property-writable-strict.
- (And a small change in propertyHelper to reduce code duplication in function call.)
2015-05-18 18:01:00 +02:00