Commit Graph

749 Commits

Author SHA1 Message Date
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 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 92a735dad7 Create distinct tests for arguments object types 2015-06-18 16:01:49 -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
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
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
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
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
Leonardo Balter 54e82687d7 Proxy: has 2015-06-15 22:37:57 -04:00
Leonardo Balter b2d4bcfd0e Proxy: defineProperty 2015-06-15 22:37:57 -04:00
Leonardo Balter a2f0f2888d Proxy: getOwnPropertyDescriptor 2015-06-15 22:37:57 -04:00
Leonardo Balter 79a256cd5a Proxy: preventExtensions 2015-06-15 22:37:56 -04:00
Leonardo Balter 15a9a15815 Proxy: isExtensible 2015-06-15 22:37:56 -04:00
Leonardo Balter 54f3f23f72 Proxy: setPrototypeOf 2015-06-15 22:37:56 -04:00
Leonardo Balter d012f5c680 Proxy: getPrototypeOf 2015-06-15 22:37:56 -04:00
Leonardo Balter c3e71dcb0b Proxy.revocable 2015-06-15 22:37:56 -04:00
Leonardo Balter 9bbe7c6272 Proxy: Core 2015-06-15 22:37:55 -04:00
Leonardo Balter b898493f53 WeakSet 2015-06-15 22:37:24 -04:00
Pieter van Ginkel e108edfd92 The Array.prototype.find function is an ES6 function.
A number of Array.prototype.find tests were missing a feature specification.
2015-06-14 06:22:33 +02:00
Pieter van Ginkel 1428368f81 The Array.prototype.fill function is an ES6 function.
One of the Array.prototype.fill tests specifies an es5id. Changed to an es6id.
2015-06-13 17:52:12 +02:00
Mike Pennisi 3fb19f53dc Add tests for OctalIntegerLiterals 2015-06-12 16:06:52 -04:00
Mike Pennisi c273e30235 Add tests for BinaryIntegerLiterals 2015-06-12 16:06:52 -04:00
Mike Pennisi ef7ddf9f7e Improve frontmatter usage
Define explanatory text using the `info` tag and include single-line
descriptions.
2015-06-12 15:36:20 -04:00
Mike Pennisi 80c67e56c1 Remove duplicative test
The assertions of this file are also made in another more complete test:
`tv-line-terminator-sequence.js`. Remove this file in favor of that one.
2015-06-12 12:02:33 -04:00
Mike Pennisi 5ca7a58e75 Introduce additional tests for ES6 templates 2015-06-12 12:02:01 -04:00
Mike Pennisi bd3d160ba1 Reorganize existing tests 2015-06-12 11:30:44 -04:00
Brian Terlson a1437652ab Merge pull request #313 from evilpie/includes
Use the more common array syntax for includes
2015-06-11 12:07:48 -04:00
Tom Schuster 64fd1026dd Use the more common array syntax for includes 2015-06-10 14:56:16 +02:00
Brian Terlson 36cbdcf8ec Merge pull request #312 from bocoup/add-omitted-negative
Insert omitted `negative` tag
2015-06-09 17:01:59 -07:00
Brian Terlson 7eb27329b3 Merge pull request #307 from bocoup/remove-fail
Remove `$FAIL` function
2015-06-09 16:59:13 -07:00
Mike Pennisi c7fb97765e Insert omitted `negative` tag
This test exercises an early error, so it should be declared with the
`negative` tag.
2015-06-09 19:48:29 -04:00
Mike Pennisi 92890e6723 Remove `$FAIL` function
This function is equivalent to `$ERROR` (which is automatically included
in test environments). Remove the harness file that defines the
function, remove references to the file from test `includes` lists, and
update scripts to instead invoke the `$ERROR` function.
2015-06-09 19:44:25 -04:00
Brian Terlson 6462958efc Merge pull request #303 from pvginkel/environment-object-deletion
Fixed testing deletion of an environment object.
2015-06-09 15:00:49 -07:00
Mike Pennisi f2cc736d94 Remove remaining includes for `assert.js` helper 2015-06-09 15:00:00 -04:00
Erik Arvidsson d28af4b101 No need to include asserts.js 2015-06-09 14:49:04 -04:00
Pieter van Ginkel 632beef930 Improved description of 11.4.1-4.a-5.
The previous description of the 11.4.1-4.a-5 test case implied that an environment object could not be deleted while inside a with. However, the actual test was to test whether the variable declaration could be deleted. The description has been updated to better reflect this.
2015-06-09 11:29:54 +02:00
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
Pieter van Ginkel 44ee5c85ea Generator test should specify generators feature. 2015-06-05 12:34:39 +02:00
Pieter van Ginkel 943face280 Fixed testing deletion of an environment object.
Test 11.4.1-4.a-5 states that it verifies that an environment object cannot be deleted. However, this was giving a false positive. It was actually testing where a "var" declaration on an environment object cannot be deleted (there are other tests for this). This test case fails on Chrome 43, Firefox 38 and Internet Explorer 11.
2015-06-03 19:31:52 +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 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
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 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
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
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
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 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
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 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
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
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
Brian Terlson 3218458c25 Merge pull request #262 from smikes/object-strict-pr2
Candidate fix of empty catch{}
2015-05-07 13:00:47 -07:00
smikes 55c1ef113d add line note fixes from #255 2015-05-07 11:00:25 -06:00
smikes d869dc6ce3 candidate fix for line note on 259 2015-05-07 10:54:50 -06:00
smikes 71c1a9cb3a changes from line notes 2015-05-07 10:49:00 -06:00
smikes 6ccabc093b strict mode: use new property helpers
Object.freeze fixes
global object tests: noStrict
preventExtensions tests
Object.seal tests

one more freeze test
2015-05-06 19:03:25 -06:00
smikes 26ede592a8 fix tests in strict mode - Object/defineProperty 2015-05-06 13:57:54 -06:00
smikes d513714fda update, fix merge conflict 2015-05-02 20:20:47 -06:00
Rick Waldron 29e2990d9b 14.5 Class Definitions
- 14.5.1 Static Semantics: Early Errors
- 14.5.3 Static Semantics: ConstructorMethod
- 14.5.14 Runtime Semantics: ClassDefinitionEvaluation
2015-05-02 14:06:57 -04:00
Brian Terlson 3907f4d5b3 Merge pull request #250 from anba/issue-35/builtins-RegExp
Fix strict mode errors in built-ins/RegExp
2015-05-02 10:33:18 -07:00
smikes 9824be6825 rewrite tests to work in strict mode, use helpers 2015-05-02 05:12:53 -06:00
Brian Terlson fc10b8c607 Merge pull request #251 from anba/issue-35/builtins-String
Fix strict mode errors in built-ins/String
2015-04-30 09:57:37 -07:00
Brian Terlson 2d2d618b51 Merge pull request #253 from anba/issue-35/builtins-uri-functions
Fix strict mode errors in {decode, encode}URI[Component]
2015-04-30 09:52:14 -07:00
Brian Terlson 76958cd940 Merge pull request #252 from anba/issue-35/builtins-global-properties
Fix strict mode errors in built-ins/{isFinite, isNaN, parseFloat, parseI...
2015-04-30 09:47:44 -07:00
Brian Terlson 3aa368b07f Merge pull request #249 from anba/issue-35/builtins-Object
Fix some strict mode errors in built-ins/Object
2015-04-30 09:46:03 -07:00
Brian Terlson b8846db038 Merge pull request #248 from anba/issue-35/builtins-Number
Fix strict mode errors in built-ins/Number
2015-04-30 09:44:22 -07:00
Brian Terlson e5d84285c8 Merge pull request #247 from anba/issue-35/builtins-Math
Fix strict mode errors in built-ins/Math
2015-04-30 09:43:51 -07:00
Brian Terlson ca88087731 Merge pull request #246 from anba/issue-35/builtins-Function
Fix strict mode errors in built-ins/Function
2015-04-30 09:36:24 -07:00
Brian Terlson aed52de599 Merge pull request #245 from anba/issue-35/builtins-Error
Fix strict mode errors in built-ins/Error
2015-04-30 09:29:35 -07:00
Brian Terlson 65fcd8e679 Merge pull request #244 from anba/issue-35/builtins-Date
Fix strict mode errors in built-ins/Date
2015-04-30 09:24:39 -07:00
Brian Terlson 5d6f33d242 Merge pull request #243 from anba/issue-35/builtins-Boolean
Fix strict mode errors in built-ins/Boolean
2015-04-29 16:16:59 -07:00
André Bargull 9ece4f2de5 Fix strict mode errors in {decode, encode}URI[Component]
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:44:25 +02:00
André Bargull 10d6e7ce0c Fix strict mode errors in built-ins/{isFinite, isNaN, parseFloat, parseInt, undefined}
- Add missing "var" declarations and noStrict flags
- Remove invalid noStrict flags

Part of issue #35.
2015-04-29 17:43:55 +02:00
André Bargull 97bebe1c8b Fix strict mode errors in built-ins/String
- Add missing "var" declarations and noStrict flags
- Remove with-statements (minor change in behaviour - primitive vs wrapper lookup, but does not seem too important for these tests)

Part of issue #35.
2015-04-29 17:43:26 +02:00
André Bargull 94be366f65 Fix strict mode errors in built-ins/RegExp
- Add missing "var" declarations and noStrict flags
- Remove with statements

Part of issue #35.
2015-04-29 17:42:48 +02:00
André Bargull 2bc08d0b0b Fix some strict mode errors in built-ins/Object
- Add missing "var" declarations and noStrict flags
- Remove invalid noStrict flags
- ietestcenter tests need fixed, require updates to use propertyHelper.js

Part of issue #35.
2015-04-29 17:41:42 +02:00
André Bargull 81a7177ff1 Fix strict mode errors in built-ins/Number
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:41:08 +02:00
André Bargull 76a7c8107b Fix strict mode errors in built-ins/Math
Add missing "var" declarations.

Part of issue #35.
2015-04-29 17:40:30 +02:00
André Bargull 0952011501 Fix strict mode errors in built-ins/Function
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:39:10 +02:00
André Bargull a5e793f7f3 Fix strict mode errors in built-ins/Error
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:38:38 +02:00
André Bargull 07fa78d677 Fix strict mode errors in built-ins/Date
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:37:58 +02:00
André Bargull 9cb5292c71 Fix strict mode errors in built-ins/Boolean
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:37:09 +02:00
André Bargull 74dde3e483 Fix strict mode errors in built-ins/Array
- Add missing "var" declarations and noStrict flags
- Move code which requires non-strict semantics from Array.prototype.find_this-arg.js to Array.prototype.find_this-arg-receiver-primitive.js
- Remove duplicate code from Array.prototype.findIndex_this-arg.js, already present in Array.prototype.findIndex_this-arg-receiver-primitive.js
- Remove test code from Array.of_assignment-to-new-object-length.js, does not work in strict mode

Part of issue #35
2015-04-29 17:36:28 +02:00
Brian Terlson 87fd4e5699 Merge pull request #240 from anba/es2015-compat-updates
Update remaining tests for ES2015 compatibility (rev38)
2015-04-27 12:55:26 -07:00
André Bargull ef8f056a76 Update remaining tests for ES2015 compatibility (rev38)
- Duplicate properties are allowed in object literals: test/language/expressions/object/*.js
- RegExpBuiltinExec was changed to use ToLength(lastIndex): test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T3.js
- Non-undefined flags arguments allowed in RegExp constructor call: test/built-ins/RegExp/*.js
- Array.prototype.push throws TypeError if new length exceeds Number.MAX_SAFE_INTEGER: test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js
- .length property of bound functions is configurable: test/built-ins/Function/prototype/bind/15.3.4.5-15-2.js
- Array.prototype changed back to exotic Array object: test/built-ins/Array/prototype/*.js, test/built-ins/Array/isArray/15.4.3.2-0-5.js
2015-04-27 18:21:34 +02:00
André Bargull e31ae1ad9f Invalid language tests
- in-statement-position-label-statement.js is an Annex-B test (B.3.2 Labelled Function Declarations), moved to annexB directory
- identifier-let-allowed-as-lefthandside-expression-strict.js needs to check for a SyntaxError (ES6, 12.1.1)
- Remove sort() calls in test/built-ins/Object/getOwnPropertyNames/*.js
- Remove sort() calls in test/language/block-scope/syntax/for-in/acquire-properties-from-*.js
- verifyConfigurable() needs to called last in test/built-ins/Object/is/length.js
- All productions within ClassBody are implicitly strict, update test/language/class/method-definition/yield-as-*.js accordingly
- Remove unnecessary noStrict flag in test/language/class/method-definition/yield-as-generator-method-binding-identifier.js
- Check own symbols are returned in property creation order from Object.getOwnPropertySymbols():
  - test/language/computed-property-names/basics/symbol.js
  - test/language/computed-property-names/class/method/symbol.js
  - test/language/computed-property-names/class/static/method-symbol.js
  - test/language/computed-property-names/object/method/symbol.js
- Fix copy-paste error in test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js
2015-04-27 16:56:19 +02:00
unknown 81476bb910 fixing a typo 2015-04-24 12:32:17 -07:00
Brian Terlson c49e2bd6b9 Merge pull request #236 from bocoup/test-assertions
Add Tests for Harness Helper Functions
2015-04-22 17:06:51 -07:00
Mike Pennisi 3211e33199 Add tests for test harness 2015-04-22 18:38:40 -04:00
Brian Terlson d25eca4184 Merge pull request #213 from bocoup/block-scope-additions
Import tests from Google V8 (Block Scope Additions)
2015-04-21 15:24:54 -07:00
Brian Terlson 6311f00ce9 Remove enochian-enochian (fixes gh-227) 2015-04-21 15:08:19 -07:00
Rick Waldron b3cbeaacb7 19.1.2.10 Object.is
7.2.9 SameValue(x, y)
2015-04-21 14:25:53 -04:00
Brian Terlson e9593a3d65 Merge pull request #220 from bocoup/for-of-more-control-flow
Additional control flow tests for `for..of` statements
2015-04-21 10:55:42 -07:00
Mike Pennisi 3bf5652774 Improve `for..of` control flow tests
- Expand ambiguous assertion messages and assert execution paths more
  finely.
- Improve variable names in `for..of` tests
  While the object created by a GeneratorFunction may be considered an
  "iterable", it is being used as an iterator in these tests. Naming the
  variable according to the way it is used improves the readability of
  the test body.
- Add 'features' attribute to test frontmatter
- Move tests
- Introduce additional `for..of` control flow tests
2015-04-21 12:55:27 -04:00
Brian Terlson f1900713aa Merge pull request #210 from bocoup/native-iterators
Import tests from Google V8 (native iterators)
2015-04-21 09:52:35 -07:00
Brian Terlson 8980d3f929 Merge pull request #228 from bocoup/arrow-functions
14.2 Arrow Function Definitions
2015-04-21 09:48:07 -07:00
Rick Waldron 93e9da29a0 14.2 Arrow Function Definitions 2015-04-20 19:53:06 -04:00
Mike Pennisi e8cc40a0a8 Import tests from Google V8 (native iterators)
These tests are derived from the following files within the Google V8
project:

    test/mjsunit/es6/typed-array-iterator.js
    test/mjsunit/es6/arguments-iterator.js
    test/mjsunit/es6/string-iterator.js
    test/mjsunit/es6/collection-iterator.js
2015-04-20 19:15:34 -04:00
Caitlin Potter 6e88ac5cec remove non-printable characters from tests 2015-04-18 20:34:08 -04:00
Brian Terlson 5eb76070cb Merge pull request #219 from Yaffle/patch-1
More tests for Math.round
2015-04-18 15:58:11 -07:00
Brian Terlson b8711eb803 Merge pull request #229 from bocoup/restructure-generator-tests-2
Restructure generator tests 2
2015-04-18 15:50:23 -07:00
Brian Terlson 43a238bc0b Merge pull request #197 from bocoup/harmony-symbols
Import tests from Google V8 (Symbol)
2015-04-18 15:49:46 -07:00
Brian Terlson a6ca558d46 Merge pull request #218 from bocoup/templates
Import tests from Google V8 (templates)
2015-04-18 15:46:34 -07:00
Mike Pennisi 909156c61f Add "features" metadata to existing tests 2015-04-15 18:47:34 -04:00
Mike Pennisi 5eb977a7c7 Move tests for generator method definitions
The project has recently changed the preferred location for generators
created via the MethodDefinition syntactic form.
2015-04-15 18:44:02 -04:00
Mike Pennisi 14cb6ca88e Extend tests for LineTerminatorSequence
Add assertions for the "Line Separtator" and "Paragraph Separator" line
terminator code points.
2015-04-15 10:50:44 -04:00
Mike Pennisi 1c3c0704fd fixup! Reorganize test files 2015-04-15 10:36:09 -04:00
Mike Pennisi 5fc17f9c2d fixup! Remove test for unspecified behavior 2015-04-15 10:20:52 -04:00
Brian Terlson b9e4a43f5e Merge pull request #204 from bocoup/generator-parsing-2
Import tests from Google V8 (generator syntax)
2015-04-14 13:31:53 -07:00
Mike Pennisi 95a78b36d5 Add tests for additional generator function forms 2015-04-14 16:23:16 -04:00
Mike Pennisi e14060bffb Add asertions for Generator Statement syntax tests
Ensure that these forms result in objects that meet basic expectations
about generator functions.
2015-04-14 16:22:12 -04:00
Mike Pennisi 93d994df0f Import tests from Google V8 (generator syntax)
These tests are derived from the following files within the Google V8
project:

    test/mjsunit/es6/generators-parsing.js
2015-04-14 16:22:12 -04:00
André Bargull ffae2ca863 Fix malformed YAML front matter 2015-04-13 20:53:44 +02:00
Caitlin Potter f398421ee7 Add tests for %FunctionPrototype% restricted properties 2015-04-11 20:46:27 -04:00
Brian Terlson afa25f6cdc Merge pull request #221 from bocoup/typeof
Update tests for `typeof` operator
2015-04-11 16:28:37 -07:00
Rick Waldron 44c65fd02a Import tests from Google V8 (Block Scope Additions)
These tests are derived from the following files within the Google V8 project:

    test/mjsunit/es6/regress/regress-2506.js
    test/mjsunit/es6/regress/regress-3426.js
    test/mjsunit/es6/regress/regress-3683.js
2015-04-09 14:21:06 -04:00
Brian Terlson 506f9fe803 Merge pull request #217 from bocoup/rest-params
Import tests from Google V8 (Rest Parameters)
2015-04-08 17:29:49 -07:00
Brian Terlson f5c848b026 Merge pull request #207 from anba/issue-98/update-currency
Changes for currency data
2015-04-08 16:08:37 -07:00
Brian Terlson 01bdfa6dd3 Merge pull request #209 from anba/issue-185,186/annexb-extensions
Don't use Annex B extensions in main test suite
2015-04-08 16:08:04 -07:00
Brian Terlson 3f04481646 Merge pull request #208 from anba/issue-103/array-find-update
Array.prototype.find does not skip holes
2015-04-08 16:07:24 -07:00
André Bargull 15cc639131 Strict eval variable declarations are lexically scoped, assign expected result value to a previously declared global (issue #35)
Add missing variable declarations (issue #35)

Split S12.6.3_A10 and S12.6.3_A10.1 because both files seem to test implicit global variables (issue #35)

Changes (issue #35)

- Add missing noStrict flags.
- Change 13.2-15-1 and 13.2-18-1 to use assert.js and propertyHelper.js (simplifies writable and configurable checks while in strict mode).
- Add variable declarations for globals.
- Create copies of S13.2.1_A6_T1 and S13.2.1_A6_T2 instead of adding variable declarations, because both files seem to test implicit global variables.
- Split S13_A14 and S13_A16 to work in strict mode.
- Remove assignment to .name property.

Add missing noStrict flags (issue #35)

Add missing noStrict flags and variable declarations (issue #35)

Add missing noStrict flags (issue #35)
2015-04-08 15:54:58 -07:00
Brian Terlson 47dcfe8cac Merge pull request #223 from bocoup/restructure-generator-tests
Re-structure generator tests
2015-04-08 10:23:28 -07:00
Mike Pennisi c759cdb804 Re-structure generator tests 2015-04-08 11:08:48 -04:00
Brian Terlson 193605524e Merge pull request #205 from caitp/patch-1
Add a test for String.prototype.concat() with single Object argument
2015-04-07 17:31:53 -07:00
Rick Waldron dcdc9ba111 block-scope: corrections. Fixes gh-201 2015-04-07 16:58:04 -07:00
Mike Pennisi 29326da2a8 Normalize application of `typeof` operator
Consistently use the `typeof` operator without the grouping operator
(and include one explicit test to ensure the validity of this pattern
generally).
2015-04-07 17:37:45 -04:00
Mike Pennisi 3dce857e32 Update tests to use assertion library 2015-04-07 17:37:45 -04:00
Mike Pennisi 663f6776aa Add ES6 IDs 2015-04-07 17:37:45 -04:00
Mike Pennisi 9c42c10e48 Correct error in test descriptions 2015-04-07 17:37:45 -04:00