Commit Graph

10 Commits

Author SHA1 Message Date
André Bargull 49221fce1f Remove no longer needed manual redeclaration tests 2017-05-04 09:34:34 -07:00
André Bargull c8e808bc69 Generate new tests for redeclarations in block- and switch-statements 2017-05-04 09:29:39 -07: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
jugglinmike b9e21138cc Add tests for script interactions (#689)
ECMA262 allows for an arbitrary number of "ScriptJob"s to run in a given realm.
Although there is no standard mechanism for enqueuing these jobs, many
implementations offer this functionality through custom APIs. In those hosts,
the semantics describing script interactions are directly observable.
In order to guarantee conformance to the specification in advance of a
standardized API, Test262 now requires that hosts provide a $.evalScript
function whose behavior is defined in the project's "INTERPRETING.md" file.
Use this host-provided API to ensure that implementations correctly observe the
specification text that dictates script interactions.
(In writing these tests, I noticed some gaps in coverage that are observable
from a single script execution. This patch includes a dedicated commit for
these tests that do not require $.evalScript.)

* Improve coverage of GlobalDeclarationInstantiation

* Add tests for script interactions

Use the host-provied `$.evalScript` method to assert conformance to the
specification text that defines script interactions.

* fixup! Improve coverage of GlobalDeclarationInstantiation
2016-07-19 18:02:05 -07: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
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
Rick Waldron dcdc9ba111 block-scope: corrections. Fixes gh-201 2015-04-07 16:58:04 -07:00
Rick Waldron 40c07540e7 Fix copyright line 2015-03-30 12:48:02 -04:00
Rick Waldron 3f9587a8ee Import tests from Google V8 (Block Scoping)
These tests are derived from the following files within the Google V8 project:

	test/mjsunit/harmony/block-conflicts.js
	test/mjsunit/harmony/block-for.js
	test/mjsunit/harmony/block-leave.js
	test/mjsunit/harmony/block-let-declaration.js
	test/mjsunit/harmony/block-let-semantics.js
	test/mjsunit/harmony/block-scoping.js
2015-03-04 11:10:46 -05:00