1057 Commits

Author SHA1 Message Date
Gorkem Yakin
85e6ab8e15 Merge branch 'bocoup/species-accessor-values' 2016-04-25 16:59:44 -07:00
Mike Pennisi
b8e40a6f3f Add tests for return value of @@species accessors 2016-04-25 16:59:23 -07:00
Gorkem Yakin
851be6108a Merge branch 'bocoup/ta-subarray' 2016-04-25 16:53:20 -07:00
Leonardo Balter
1f9cc0b0c0 Add tests for TypedArrays subarray 2016-04-25 16:52:20 -07:00
Gorkem Yakin
f6475d81bf Merge pull request #543 from bocoup/enumerable-helper
Fix verifyEnumerable helper to account for properties with Symbol values
2016-04-25 16:32:53 -07:00
Mike Pennisi
784824895d Extend coverage for eval code
Closes #572

Introduce tests for new semantics for ES2015 features such as
lexically-scoped bindings. Also add tests for semantics defined in prior
editions of the specification but not yet covered in this test suite.
2016-04-25 16:43:48 -04:00
Mike Pennisi
2872537136 Add equivalent tests for eval code
For each test that asserts the behavior of either "direct" or "indirect"
eval (but not both), introduce an equivalent test for the opposite case.
2016-04-25 16:36:41 -04:00
Mike Pennisi
364d6433e2 Refactor tests for eval code
Some tests asserted behavior for both "direct" eval and "indirect" eval.
Split these assertions across files dedicated for each use case.
2016-04-25 16:36:39 -04:00
Mike Pennisi
7630e1763d Re-organize tests for eval
Limit tests in `language/expressions/call/` and `built-ins/eval/` to
only assert details that are directly related to the invocation pattern.
Re-organize all other tests within the `language/eval-code/` directory,
further categorizing each as `direct` or `indirect` as appropriate.
Remove the extraneous "executable" flag from those files which carried
it.
2016-04-25 16:36:36 -04:00
Gorkem Yakin
7f88f29328 Merge branch 'bocoup/global-object' 2016-04-25 11:09:49 -07:00
Mike Pennisi
eb644bb2da Reduce reliance on fnGlobalObject.js
This harness function is not necessary in the majority of cases in which
it is used. Remove its usage to simplify tests and decrease the amount
of domain-specific knowledge necessary to contribute to the test suite.

Persist the harness function itself for use by future tests for ES2015
modules (such a helper is necessary for tests that are interpreted as
module code).
2016-04-25 11:09:21 -07:00
Gorkem Yakin
562133f4ba Merge branch 'bocoup/symbol-cleanup' 2016-04-25 10:59:48 -07:00
Mike Pennisi
3d68fcc063 Increase coverage for Symbol constructor
Add new tests for invocation requirements; re-organize existing files
according to the language feature under test.
2016-04-25 10:59:22 -07:00
Gorkem Yakin
35c00cab92 Merge branch 'bocoup/ta-every-some' 2016-04-25 10:46:38 -07:00
Leonardo Balter
45ff661f75 Add tests for TypedArrays some 2016-04-25 10:46:22 -07:00
Leonardo Balter
3339406dd7 Add tests for TypedArrays every 2016-04-25 10:46:16 -07:00
Gorkem Yakin
a4fd0dc8f4 Merge branch 'bocoup-ta-interoperability' 2016-04-25 10:37:06 -07:00
Leonardo Balter
866626500c Update tests for TypedArrays/DataView non-interoperable get accessor methods
Fixes gh-582
2016-04-25 10:36:50 -07:00
Gorkem Yakin
c26ef14ae0 Merge branch 'bocoup/ta-indexof' 2016-04-25 10:32:22 -07:00
Leonardo Balter
d1f02d0fb8 Add tests for TypedArrays lastIndexOf 2016-04-25 10:31:42 -07:00
Leonardo Balter
d46b0b1860 Add tests for TypedArrays indexOf 2016-04-25 10:31:38 -07:00
Gorkem Yakin
a432cde542 Merge pull request #534 from mythrialle/master
Removes special handling for UTC timezone in toISOString/15.9.5.43-0-1…
2016-04-25 10:02:19 -07:00
Mythri
664ec78fcc Moves Date constructor outside of assert, so that it actually tests toISOString 2016-04-25 16:45:03 +01:00
Leonardo Balter
bc0a40c51c Add tests for TypedArrays findIndex 2016-04-25 11:43:19 -04:00
Mythri
679d02a6ed Fixed comments 2016-04-25 15:43:55 +01:00
Leonardo Balter
9aa4dced8d Add tests for TypedArrays find 2016-04-22 10:34:30 -04:00
Leonardo Balter
bc8ae6e0ae Fix test for TypedArray.prototype.forEach 2016-04-21 17:22:55 -04:00
jugglinmike
ba3dacbe5a Correct tests for native functions' toString value (#580)
Modify the regular expression for native functions' toString value to
satisfy all test cases. Correct the test file's reference to the harness
file. Re-format the test file's assertions to aid debugging in the event
of failure.
2016-04-21 15:55:54 -04:00
jugglinmike
38329a7038 Add tests for TryStatement binding restrictions (#577)
This changeset includes tests for early errors and those generated
dynamically by eval. It also accounts for relevant AnnexB extensions.
2016-04-21 15:54:25 -04:00
Leonardo Balter
88f390d189 Add tests for TypedArrays copyWithin 2016-04-20 14:08:33 -04:00
Leonardo Balter
5e8b661050 Add tests for TypedArrays fill 2016-04-20 14:05:38 -04:00
jugglinmike
cf68c3be91 Correct invalid tests for the Date constructor
The millisecond representation of a given Date instance is dependent on
the local system's time zone settings. In order to pass consistently
across contexts, tests for this value must take the system configuration
into account.

Introduce a test harness utility function to encapsulate these concerns.
Re-use this function across all test files that assert the exact
millisecond representation of Date instances.
2016-04-19 17:00:59 -04:00
Leonardo Balter
04a3c28f7d Add tests for conversion operations on TypedArrays 2016-04-19 12:18:52 -04:00
Mike Pennisi
b698c8b3ab Add tests for Math constants
Closes gh-540

Because the specific value of each constant is specified as a
host-defined approximation, only the value type may be enforced by
Test262.
2016-04-18 14:39:37 -04:00
Mike Pennisi
f7aa31b41f Remove over-specified tests
Except for a small set of expected input/output pairs, both ES5 and
ES2015 define the expected return value of these methods in terms of an
"implementation-dependent approximation." This makes it inappropriate to
enforce expectations for specific values, even if expressed imprecisely.
2016-04-18 14:36:49 -04:00
jugglinmike
26676beab5 Add tests for IteratorClose in dstr assignment (#524)
The files in this patch are organized according to the following naming
scheme:

Prefix             | Grammar production
-------------------|-------------------
`array-empty-`     | ArrayAssignmentPattern : [ ]
`array-elision-`   | ArrayAssignmentPattern : [ Elision ]
`array-rest-`      | ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
`array-elem-`      | ArrayAssignmentPattern : [ AssignmentElementList ]
`array-elem-trlg-` | ArrayAssignmentPattern : [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]

Suffix             | Intent
-------------------|-------
`-abpt-close-err`  | The assignment evaluation returns an abrupt completion, and the iterator's `return` method throws an error
`-abpt-close-skip` | The assignment evaluation returns an abrupt completion, but IteratorClose is not invoked
`-abpt-close`      | The assignment evaluation returns an abrupt completion, and IteratorClose is invoked as specified
`-get-err`         | Abrupt completion returned from GetIterator
`-nrml-close-err`  | The assignment evaluation completes, and the iterator's `return` method throws an error
`-nrml-close-null` | The assignment evaluation completes, and the iterator's `return` method returns a non-Object value (there is no corresponding `-abpt-` suffix because the algorithm does not reference the return value in those cases)
`-nrml-close-skip` | The assignment evaluation completes, but IteratorClose is not invoked
`-nrml-close`      | The assignment evaluation completes, and IteratorClose is invoked as specified

Not all suffixes are appropriate for all productions. Suffixes have been
simplified in cases where less specificity is necessary to disambiguate
test cases.
2016-04-18 14:33:21 -04:00
dtig
20d37a6f2f Add SIMD test suite and utility functions (#442) 2016-04-18 14:26:15 -04:00
jugglinmike
c230b7f307 Add tests for RegExp literal early errors (#566) 2016-04-18 13:36:43 -04:00
jugglinmike
a068f19f06 Streamline redundant eval tests (#570)
Some tests for `eval` assert the equality of key enumeration on the
global object, comparing the ordering when the object is referenced
through eval.

Based on the test bodies and the "info" field in their metadata, these
tests appear to have been written under the mistaken impression that
erroneous creation of an environment record would be observable through
the `this` value.

In reality, the value in such cases resolves to the global object. That
renders these tests redundant and overly complex--none of the
distinctions between each test actually demonstrates a different
behavior.

Remove the redundant tests and introduce three new tests asserting the
correct resolution of the `this` keyword for direct eval code from
within the global scope and from within function scope.
2016-04-18 13:35:03 -04:00
Leo Balter
3723e7caeb Merge pull request #545 from bocoup/generation
Introduce test generation tool
2016-04-15 17:56:36 -04:00
Leonardo Balter
e7f6cd7f86 assert.throws fails if second argument is not a function 2016-04-15 10:14:54 -04:00
Leonardo Balter
e451026965 Fix minor typo on a test for Array#fill 2016-04-12 19:48:54 -04:00
Leonardo Balter
f3cc1fb983 Add tests for TypedArrays map 2016-04-12 15:41:38 -04:00
Leonardo Balter
e01371e12a Add tests for TypedArrays forEach 2016-04-12 15:41:34 -04:00
Jordan Harband
45e5fc8889 Add System.global tests (#567) 2016-04-12 14:37:10 -04:00
Michael Ficarra
6b7cbb5035 add Function.prototype.toString tests, conforming to proposed revision
See the proposal at
https://tc39.github.io/Function-prototype-toString-revision/
2016-04-11 14:39:12 -04:00
Leonardo Balter
c15079e741 Remove surface tests for %TypedArray%.prototype.toString
Because Test262 asserts the strict equality of
`Array.prototype.toString` and `TypedArray.prototype.toString`, tests
for properties of the object do not need to be reproduced in both
location.

Ref gh-526
2016-04-07 11:36:15 -04:00
Jordan Harband
c95e673feb Add tests for String#padStart and String#padEnd.
https://github.com/tc39/proposal-string-pad-start-end/issues/23

Closes gh-564
2016-04-06 15:13:52 -04:00
Leonardo Balter
755b0d6117 Add tests for typedArrays extensibility
Ref: https://github.com/tc39/test262/pull/536#issuecomment-200455389
2016-04-01 15:34:14 -04:00
Leonardo Balter
3cb20b9df5 Add tests for internal methods of typedArray instances
Test specific behaviour for Integer Indexed exotic objects, WRT the
following internal methods:

- [[GetOwnProperty]]
- [[HasProperty]]
- [[DefineOwnProperty]]
- [[Get]]
- [[Set]]
- [[OwnPropertyKeys]]
2016-03-28 10:38:24 -04:00