Commit Graph

883 Commits

Author SHA1 Message Date
Mike Pennisi b2a62444fc fixup! Add tests for MethodDefinition forms new to ES6
Update test according to latest change to ES6 spec:
https://twitter.com/awbjs/status/603251578070552576
2015-05-26 14:52:21 -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
Mike Pennisi 30a4a5da7d fixup! Add tests for MethodDefinition forms new to ES6
Avoid extending builtin prototype and consistently define a shadowing
property on the object instance to help recognize a possible
implementation bug.
2015-05-26 12:33:51 -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
Mike Pennisi 31bdf48bec Add tests for MethodDefinition forms new to ES6 2015-05-25 11:23:47 -04:00
Mike Pennisi cde990b79c Rename tests 2015-05-25 11:23:46 -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
Brian Terlson b56af07567 Merge pull request #269 from suwc/Math_builtins
Add new tests for Math built-ins
2015-05-16 11:26:19 -07:00
Brian Terlson 19481d3801 Use a very negative number so ES5 implementations don't loop forever 2015-05-15 15:30:39 -07:00
Brian Terlson 68e6a66353 Merge pull request #270 from edgemaster/patch-1
S15.4.4.5_A3.1_T1.js: Fix inconsistent error message
2015-05-15 10:23:17 -07:00
Thomas Wood af64d5e6de S15.4.4.5_A3.1_T1.js: Fix inconsistent error message
Test for x.join(NaN) reports an error using the content of x.join("NaN"). This is confusing.
2015-05-15 15:05:48 +01:00
Suwei Chen b6e870d236 Add new tests for Math built-ins 2015-05-14 15:04:00 -07:00
Brian Terlson 5ce9712be0 Python harness: run tests in both modes by default 2015-05-13 18:52:01 -07:00
Brian Terlson ab44f59d1b Merge pull request #265 from anba/issue-35/language-eval
Fix strict mode errors in language/{identifiers, line-terminators, wh…
2015-05-13 14:43:30 -07:00
Brian Terlson c4b1e30a42 Merge pull request #266 from anba/issue-35/builtins-rest
Fix remaining strict mode errors in built-ins
2015-05-13 14:20:29 -07:00
Brian Terlson 106b935f17 Merge pull request #264 from anba/issue-35/language-non-eval
Fix strict mode errors in language
2015-05-13 14:19:32 -07:00
Brian Terlson 5a4cdd0a86 Merge pull request #268 from cshung/update-comment
The comment is no longer accurate, updating it
2015-05-12 15:12:43 -07:00
Andrew Au cbe3b6d8fb The comment is no longer accurate, updating it 2015-05-11 11:13:23 -07:00
André Bargull d99503e5ca Fix remaining strict mode errors in built-ins
Add missing noStrict flags and variable declarations.

Part of issue #35.
2015-05-08 17:40:57 +02:00
André Bargull 9a602905d7 Fix strict mode errors in language/{identifiers, line-terminators, white-space}
Make tests strict mode compatible by assigning result value to a separate variable.

Part of issue #35.
2015-05-08 17:33:33 +02:00
André Bargull 89a4bb5ae4 Fix strict mode errors in language
- Add missing "var" declarations and noStrict flags
- Add strict mode tests for:
 - arguments-object/10.6-6-3 -> arguments-object/10.6-6-3-s
 - arguments-object/10.6-6-4 -> arguments-object/10.6-6-4-s
- Remove try-finally clean-up code
- Add strict mode compatible tests for eval-code/S10.4.2_A1.1_T*
  - No strict mode compatible files added for eval-code/S10.4.2_A1.2_T*, because it doesn't really make sense in this context.
  - (S10.4.2_A1.1 and S10.4.2_A1.2 should probably be removed, because the tested behaviour is not required by the spec.)
- Split S8.5_A10, S8.5_A4 and S8.1_A3 into declaration (both modes) and assignment tests (non-strict only)

Part of issue #35.
2015-05-08 17:27:52 +02:00
Brian Terlson a66c978c5f Merge pull request #237 from bocoup/generators-semantics
Generators semantics
2015-05-07 16:16:09 -07:00
Mike Pennisi 7b969ce65b Add analogous tests
Introduce additional tests to increase parity in coverage between
generator expressions and generator statements.
2015-05-07 19:11:47 -04:00
Mike Pennisi 779a59f30c Import tests from Google V8 (generators semantics)
These tests are derived from the following files within the Google V8
project:

    test/mjsunit/es6/generators-iteration.js
    test/mjsunit/es6/generators-objects.js
    test/mjsunit/es6/generators-runtime.js
    test/mjsunit/es6/generators-states.js
2015-05-07 19:11:47 -04:00
Brian Terlson 5188ab028a Merge pull request #261 from smikes/object-strict
strict mode: use new property helpers
2015-05-07 13:15:07 -07:00