1336 Commits

Author SHA1 Message Date
jugglinmike
a657b64ae4 Add documentation on interpreting tests (#508)
The project's CONTRIBUTING.md was written with test authors in mind. It
contains details on non-technical metadata (e.g. "author" and "es6id"),
helper function usage, and preferred code structure. In addition, it
elides certain low-level technical details on the requirements for the
runtime environment.

Introduce a new document targeted towards those executing the tests.
Formalize all expectations regarding how the runtime environment should
be defined, how metadata should be interpreted, and how results should
be understood. This information has overlap with the CONTRIBUTING.md
file, but it also contains details that are irrelevant to test authors.

This document can serve as a more formal contract between Test262 and
the implementors who consume it. This allows Test262 to unambiguously
document future modifications to the formal requirements which in turn
supports consumers who maintain their own test harnesses.
2016-04-18 14:31:51 -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
Leo Balter
c4086508db Merge pull request #555 from bocoup/fix-example
Correct example in contribution guidelines
2016-03-29 15:19:02 -07: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
Leonardo Balter
887b379421 Add tests for ArrayBuffer.isView 2016-03-24 12:14:26 -04:00
Leo Balter
35b93bb5c2 Merge pull request #548 from bocoup/random-fp
Avoid false positives
2016-03-24 10:49:44 -04:00
Leonardo Balter
ce503e638f Add tests for detached buffer validation on TypedArray methods 2016-03-23 12:13:41 -04:00
Leonardo Balter
70c7375be8 Add harness/detachArrayBuffer.js 2016-03-22 17:00:01 -04:00
Mike Pennisi
3a3ced170e Correct example in contribution guidelines
As written, the example for asserting runtime errors is written with an
early error. Because the error is expected to be reported prior to
program execution, the `assert.throws` function cannot be used to detect
it.

Demonstrate the usage of the helper function with a runtime error.
2016-03-22 09:53:56 -04:00
Leonardo Balter
7499d3c208 Add missing surface tests for %TypedArray%.prototype.includes 2016-03-21 14:28:44 -04:00
Leonardo Balter
83b27c9beb Add validation tests for TypedArray instance methods 2016-03-21 11:04:26 -04:00
Leonardo Balter
b26190f1ce Add tests for TypedArray instance iterator methods 2016-03-21 11:04:25 -04:00
Leo Balter
ba26b7f2dc Merge pull request #541 from bocoup/statement-decl
Add syntax tests for declaration restrictions
2016-03-18 15:48:44 -04:00
Leo Balter
0000bcd78c Merge pull request #533 from bocoup/safe-integers
Add tests for Number.{MAX,MIN}_SAFE_INTEGER
2016-03-17 17:32:38 -04:00
Leo Balter
5b06fab039 Merge pull request #531 from bocoup/debugger
Add tests for `debugger` statement
2016-03-17 17:29:59 -04:00
Mike Pennisi
6e61c27aa5 Avoid false positives
As written, the test for `Math.random` would pass if the runtime
erroneously produced a non-numeric value. Add the necessary assertions
to guard against this case.
2016-03-17 17:12:54 -04:00
Leo Balter
86ff467767 Merge pull request #525 from anba/throw-type-error
Improve coverage %ThrowTypeError% and default class constructors
2016-03-17 16:31:37 -04:00
Leo Balter
5357b1585b Merge pull request #504 from bocoup/explicit-async
Make asynchronous test configuration explicit
2016-03-17 15:28:08 -04:00
Mike Pennisi
74bff6b3d5 Add initial set of generated test sources 2016-03-16 15:29:30 -04:00
Mike Pennisi
c5b9716144 Introduce test generation tool 2016-03-16 14:39:44 -04:00
Mike Pennisi
021ed85d97 Add syntax tests for declaration restrictions
Assert that declarations are not permitted in positions reserved for
statements only.
2016-03-11 12:23:15 -05:00
Leo Balter
b1c979d391 Merge pull request #539 from bocoup/id-to-esid
Update meta data: `id` to `esid`
2016-03-11 11:42:29 -05:00
Mike Pennisi
63c1cd3da8 Update meta data: id to esid
The project's expected frontmatter tag name changed while these files
were under review.
2016-03-10 19:46:46 -05:00
Mike Pennisi
cb19235ba4 Add tests for Number.{MAX,MIN}_SAFE_INTEGER 2016-03-09 12:21:29 -05:00
Mike Pennisi
4f5a8674c2 Add tests for debugger statement
The runtime semantics of this statement are host-defined and therefore
untestable, but the statement's affect on the formal grammar should be
consistent across all implementations.
2016-03-09 11:12:56 -05:00
Dan Ehrenberg
007d3b1eb7 Remove a blank line to stop confusing YAML parsers
V8 ran into an issue where the YAML parser our test setup is using
didn't understand the newline, and failed to parser the negative
test expectation below, causing the test to fail. This patch fixes
the issue.
2016-03-04 15:01:01 -05:00
Gorkem Yakin
6e912b0825 Merge pull request #518 from anba/typedarray_getownpropdesc_fixes
Fix test bugs
2016-03-02 13:22:29 -08:00
Gorkem Yakin
e9c7608f6f Merge pull request #517 from bocoup/typedarray-prototype 2016-03-02 13:16:03 -08:00
Leonardo Balter
7445d77d6d Update descriptor tests for %TypedArray%.prototype properties 2016-03-02 13:15:03 -08:00
Leonardo Balter
02cdfacd31 Add tests for %TypedArray%.prototype get methods
Includes buffer, byteLength, byteOffset, length, and @@toStringTag
2016-03-02 13:15:01 -08:00
Leonardo Balter
6c56658974 Add tests for _TypedArray_.prototype methods 2016-03-01 15:36:34 -05:00
André Bargull
2acbd3e98e Improve coverage for default class constructors 2016-03-01 19:15:21 +01:00
André Bargull
c46f5ff4b7 Increase coverage for %ThrowTypeError% 2016-03-01 19:13:43 +01:00
Gorkem Yakin
5a77ac86a9 Merge branch 'bocoup/for-restrictions' 2016-02-25 14:22:09 -08:00
Mike Pennisi
4dd2d9b7ee Add tests for IterationStatement early errors 2016-02-25 14:21:08 -08:00
Gorkem Yakin
b35b39c4aa Merge branch 'bocoup/module-code' 2016-02-25 13:51:47 -08:00
Gorkem Yakin
a5e8ac18c4 Merge pull request #513 from bocoup/runner-deprecate
Console Runner: Revert Parallelization and Formally Deprecate
2016-02-25 13:50:26 -08:00
Gorkem Yakin
304dbf0569 Merge 'rwaldron/exponentiation-operator' 2016-02-23 14:25:05 -08:00