87 Commits

Author SHA1 Message Date
Daniel Ehrenberg
8d7dd538f1 Generate tests 2018-05-11 15:48:43 -04:00
André Bargull
b552dad5cb Various test cases for cross-browser compliance bugs 2018-05-03 09:27:27 -07:00
André Bargull
a1faccdd41 Fix various test bugs
- "CannotSuspendMainAgent" feature was changed to "CanBlockIsFalse" flag
- Move annex-b tests into annex-b directory
- Update variable names in nonshared-int-views.js tests
- Move getReport() call in nan-for-timeout.js to avoid iloop
- Update BigInt constructor to match new semantics (tc39/proposal-bigint#138)
2018-04-24 09:52:35 -07:00
Rick Waldron
6f59ddc457 Fix annex B tests 2018-01-25 14:37:36 -05:00
Valerie R Young
524f545f3d Add reference tests for trimLeft and trimRight 2018-01-25 14:10:40 -05:00
Valerie R Young
2905e6a293 fixup: Add initial tests for trim(Start/End/Left/Right) 2018-01-25 14:10:14 -05:00
Valerie R Young
5931e313fc Add initial tests for trim(Start/End/Left/Right) 2018-01-25 14:10:14 -05:00
André Bargull
cbe12a53e1 Remove duplicate esids 2018-01-25 13:59:37 -05:00
André Bargull
f717982c94 Remove unused includes 2018-01-25 13:59:37 -05:00
Rick Waldron
4afc330363 Fix: various lint fixes 2018-01-10 17:29:48 -05:00
Rick Waldron
3be781c92d Fix: es6id -> esid sec-additional-syntax-numeric-literals 2018-01-10 16:01:45 -05:00
Rick Waldron
bbf3301ff4 Fix: es6id -> esid sec-html-like-comments 2018-01-10 16:01:21 -05:00
Mike Pennisi
136110378b Rename negative test "phase" for parsing
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.

Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.
2018-01-05 15:17:50 -05:00
Rick Waldron
92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
André Bargull
9b54779018 Add tests for recompilation in @@split 2017-12-19 15:42:56 -05:00
André Bargull
eecf0fd06b Add tests for html-comments in Function constructor call 2017-12-19 15:42:56 -05:00
André Bargull
2d6a356699 Move incomplete_hex_unicode_escape.js to annexB
Fixes #1313
2017-11-01 08:23:43 -07:00
Leo Balter
f8f5a7a1e7
Add missing generators flags 2017-10-26 19:04:57 -04:00
Jeff Walden
c05138b44c Modify $262.uncallableAndIsHTMLDDA() to $262.IsHTMLDDA (#1305)
Modify $262.uncallableAndIsHTMLDDA() to an optional $262.IsHTMLDDA (whose use must be guarded by a feature of the same name), and narrowly/correctly prescribe its requirements consistent with `document.all`'s behavior in HTML.
2017-10-19 15:03:21 -04:00
Jeff Walden
99ee383d3f Fix a minor error-message typo, and include the thrown error in the TypeError-testing error message. 2017-10-18 15:28:36 -04:00
Jeff Walden
2974f19e89 Add a test for GetIterator(obj, ~async~) attempting to call obj[@@asyncIterator] even if that value is an object with an [[IsHTMLDDA]] internal slot. 2017-10-18 00:27:10 -07:00
Jeff Walden
76c1a8fa3a Add tests for the case of <iterator>.return, as used in the iteration protocol, being an object that's uncallable and compares equal to undefined. 2017-10-17 12:21:43 -07:00
André Bargull
804e008310 Split Annex-B parts of non-unicode-malformed.js into annexB folder 2017-09-18 14:39:32 -04:00
Leo Balter
358a295db0 Use verifyProperty on test/annexB/ files 2017-09-08 10:13:36 -04:00
Leo Balter
7630235d5d Re-generate tests 2017-09-08 10:13:36 -04:00
Mike Pennisi
81d00def42 Force "early error" tests to fail if evaluated
This pattern makes expectations more explicit by making test files more
literal.
2017-06-28 11:24:36 -04:00
Rick Waldron
d0ba3251d2 Restore migration to assert.sameValue
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-26 14:36:51 -04:00
Daniel Ehrenberg
a2f44c7151 Additional test for range case pointed out by @anba 2017-06-23 12:16:28 -04:00
Daniel Ehrenberg
0e6acc0842 Change test based on new spec version 2017-06-23 12:16:28 -04:00
Daniel Ehrenberg
b82be14e26 Add tests for invalid \c in character class
This patch implements tests for https://github.com/tc39/ecma262/pull/864
2017-06-23 12:16:28 -04:00
Daniel Ehrenberg
ce217fffad Improve invalid \c escape tests 2017-06-23 12:16:28 -04:00
André Bargull
d887db88ee Add tests escaped/unescaped yield/await labels 2017-05-02 12:09:30 -07:00
Leo Balter
ca314476a9 Update RegExp tests for named-capturing and dotAll (#1009)
* Split order tests for RegExp#flags

* small fixes for RegExp named groups

* Remove invalid syntax

* The test mustn't include the global flag
2017-05-01 12:08:31 -04:00
Leo Balter
fa9aae7750
Use assert api instead of $ERROR 2017-04-24 15:31:52 -04:00
Mike Pennisi
2c0c3e7f96 Correct typo in copyright information 2017-04-18 12:23:22 -04:00
Daniel Ehrenberg
f759df6322 Copyright attribution for test 2017-04-17 12:49:47 +02:00
André Bargull
d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Daniel Ehrenberg
89e15ce814 Test to block legacy hoisting for function arguments() {} (#970)
Ref https://github.com/tc39/ecma262/issues/815
Ref https://github.com/tc39/ecma262/pull/889

This is testing the current semantics of the specs, rather than the semantics in the proposed referenced issue.
2017-04-13 11:06:16 -04:00
Leo Balter
ce95292899 Merge pull request #939 from dilijev/typo
Corrected typo in annexB templates exsting->existing
2017-04-06 11:57:57 -04:00
Doug Ilijev
5da6f981e9 Add escape-above-astral.js to cover escaping code units as encoded from extended unicode escape. (#942) 2017-03-28 20:09:16 -04:00
Doug Ilijev
7bc56aaf2f Regenerated tests. 2017-03-27 17:49:48 -07:00
Leo Balter
e45b2ae532 Add tests for computed __proto__ property keys (#916)
Fixes #904
2017-03-16 12:16:27 -04:00
Leonardo Balter
340543bc11
Rename top level 'name' and 'length' bindings
Fix 850
2017-03-14 12:43:24 -04:00
Zirak
ed2bcdc0a9 Add missing test cases for set __proto__ (#898)
Fixes #887
2017-03-13 11:03:28 -04:00
Leonardo Balter
874ce565ed
Generate tests 2017-03-06 16:05:38 -05:00
André Bargull
204266794c Fix various test issues (#840)
test/annexB/built-ins/Date/prototype/setYear/time-clip.js
test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
- Don't try to test time-clip at the end points, because this is near
impossible to get right (needs to consider time zone offset, dst, local
mean time because of Africa/Monrovia, etc.).

test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
- Wasn't update to expect RangeError

test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
- Change ClassDeclaration -> ClassExpression to get completion value

test/built-ins/Function/prototype/toString/AsyncFunction.js
- Add missing \n in expected string
- Also fixed in gh-847

test/built-ins/global/global-object.js
- Add 'var' to make test pass in strict-mode

test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js
- This is allowed in sloppy mode when Annex B is implemented

test/language/expressions/async-generators/expression-yield-as-statement.js
- Fix calls to then()

test/language/module-code/namespace/internals/own-property-keys-binding-types.js
test/language/module-code/namespace/internals/own-property-keys-sort.js
- Tests weren't updated after removal of @@iterator from module
namespace objects

test/language/module-code/namespace/internals/set-prototype-of-null.js
- Fix syntax error

test/language/statements/async-function/early-errors-no-async-generator.js
- No longer valid now that async iteration proposal is at stage 3
2017-02-07 11:10:56 -05:00
Mike Pennisi
7d4b1d28ae Re-format tests for SyntaxErrors
Authored via the following command:

   $ find test -type f -print0 | \
       xargs -0 sed \
         -i 's/^\(\s*\)negative:\s*SyntaxError\s*$/\1negative:\n\1  phase: early\n\1  type: SyntaxError/g'
2016-10-19 15:24:21 -04:00
Mike Pennisi
0c29e6de86 Reformat miscellaneous negative tests
The expected errors in these tests cannot be asserted with the
`assert.throws` helper function for various reasons. Re-format their
meta-data according to the latest design in order to more precisely
describe test expectations.
2016-10-19 15:24:19 -04:00
Kevin Gibbons
d6580e8b66 Add tests for for-in initializers (#735)
These were re-introduced in sloppy mode per
https://github.com/tc39/ecma262/pull/614
2016-08-02 15:47:39 -04:00
jugglinmike
a41b71115b Annex b skip fib (#704)
* Re-generate tests

The test generation tool has been modified in the time since these tests
were first generated and committed to the project. Re-generate the tests
using the latest version of the tool.

* Add test cases for Annex B hoisting disqualifiers

The "variable-like" function hoisting semantics defined in Annex B
extension B.3.3 is only applied if "[...] replacing the
FunctionDeclaration f with a VariableStatement that has F as a
BindingIdentifier would not produce any Early Errors [...]". Test262
previously included tests for this condition when the disqualifying
early error originated from the ScriptBody and FunctionBody productions.

Add test cases to assert the behavior when it is disqualified by all
other relevant early errors: Block statements, `for` statements,
`for-of` statements, `for-in` statements, and Switch statements.

* Generate tests

* fixup! Add test cases for Annex B hoisting disqualifiers

* fixup! Add test cases for Annex B hoisting disqualifiers

Correct test case "info" meta-data.

* fixup! Add test cases for Annex B hoisting disqualifiers

Improve test bodies

* fixup! Generate tests
2016-07-11 16:37:42 -07:00