74 Commits

Author SHA1 Message Date
Caio Lima
fbbab61b4a Adding cases to check if SyntaxError is thrown if AllPrivateIdentifiersValid returns false. (#2301) 2019-08-28 14:58:43 -03:00
Kubilay Kahveci
9b29709797 Add tests for .toString() of private methods (#2268) 2019-08-05 16:47:19 -04:00
Leo Balter
ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Alexey Shvayka
df1a1c75b7 Remove trailing spaces from YAML blocks (#2201) 2019-06-19 16:39:21 -04:00
Aleksey Shvayka
6f4c0d96f7 Improve GetFunctionRealm coverage (#2155)
* Fix Function.prototype.bind test

* Simplify Proxy test

* Info tweaks

* Add Function.prototype.bind recursive test

* Add Proxy recursive test
2019-05-22 18:11:49 -04:00
Aleksey Shvayka
5a725fe122 Expect TypeError from correct realm 2019-05-15 21:29:11 +03:00
Aleksey Shvayka
b6cc89c61d Add abrupt completion tests 2019-05-15 03:28:33 +03:00
Aleksey Shvayka
8551382805 Add cross-realm "this not callable" test 2019-05-15 01:37:52 +03:00
Aleksey Shvayka
385848d449 Rename & merge "this not callable" tests 2019-05-15 01:36:22 +03:00
Aleksey Shvayka
9c93e05d90 Unify "length" tests 2019-05-15 00:01:29 +03:00
Aleksey Shvayka
6943b289fc Add cross-realm "argArray not object" test 2019-05-14 23:07:27 +03:00
Aleksey Shvayka
171b3ef083 Rename & merge "argArray not object" tests 2019-05-14 23:07:23 +03:00
Kevin Gibbons
8ed9947df1 add async-iteration flag (#1942) 2018-11-08 15:32:40 -05:00
Adrian Heine né Lang
0475c127c4 Fix some generators feature flags (#1933) 2018-11-07 17:51:23 -05:00
André Bargull
b552dad5cb Various test cases for cross-browser compliance bugs 2018-05-03 09:27:27 -07:00
Rick Waldron
c55d2ab7c3 Extensive Function toString updates for "Function.prototype.toString revision" proposal. (#1510)
Fixes gh-1453
2018-04-19 16:44:52 -04:00
Ross Kirsling
a7b2d07a94 Remove errant LF from CR line ending test. 2018-04-05 23:32:25 -07:00
Michael Ficarra
3207bf74d0 Function.prototype.toString works on symbol-named built-ins 2018-03-07 14:09:45 -05:00
Michael Ficarra
f3b8aff71f Function.prototype.toString works on anonymous well-known intrinsics 2018-03-07 14:09:45 -05:00
Michael Ficarra
7d5a5fef36 add Function.prototype.toString result for callable proxies 2018-03-07 14:09:45 -05:00
Michael Ficarra
83ffb4bbf2 allow any function to report its toString as a NativeFunction
related: https://github.com/tc39/Function-prototype-toString-revision/pull/26
2018-03-07 14:09:45 -05:00
Valerie R Young
d807e8fa96 Update Function/prototype/toString 'esid: pending' frontmatter 2018-02-22 13:34:08 -05:00
Rick Waldron
1b30a976e8 built-ins/Function/*: make all indentation consistent (depth & character) (#1424)
This intentionally skips test/built-ins/Function/prototype/toString/*
2018-02-15 15:49:19 -05:00
Adrian Heine
2fb8eca677 Fix typo intialize(r) -> initialize(r) 2018-02-12 10:05:52 -05:00
André Bargull
f95b56ab28 Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722d088055a7d84d8c691ddd7109edb34.
2018-02-09 12:09:47 -05:00
Rick Waldron
a01de4a722 js-beautify: make all indentation consistent (depth & character) (#1409) 2018-02-09 11:35:37 -05:00
Rick Waldron
92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Leo Balter
f8f5a7a1e7
Add missing generators flags 2017-10-26 19:04:57 -04:00
Leo Balter
7cbbe51216 Add cross-realm feature 2017-09-22 15:29:10 -04:00
Leo Balter
c41faf1aca Add missing Symbol features flags 2017-09-07 15:51:13 -04:00
Mike Pennisi
2c0c3e7f96 Correct typo in copyright information 2017-04-18 12:23:22 -04:00
André Bargull
d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Joseph Pecoraro
5424c81184 Fix Function.prototype.bind test (#958)
The `length` property should be [[Configurable]]
https://tc39.github.io/ecma262/#sec-function.prototype.bind

Also the test was testing deleting the wrong property.

Fixes #957.
2017-04-11 03:14:32 -04:00
André Bargull
da764cafa2 Add Function.prototype.toString tests for async generator functions (#955)
* Add Function.prototype.toString tests for many function forms
* Add non-const computed property name to Function.prototype.toString tests
* Split class method tests into class-expression and class-statement tests
* Add tests for unnamed function expression forms
* Add tests for async (generator) methods in class contexts
* Add test case for Function.prototype.toString on async arrow function
2017-04-10 14:37:07 -04:00
Leonardo Balter
340543bc11
Rename top level 'name' and 'length' bindings
Fix 850
2017-03-14 12:43:24 -04:00
Rick Waldron
fdd2fa9b1c Rename $ => $262. Fixes gh-802 (#823)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-03-01 16:34:15 -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
Josh Wolfe
4203261ba2 add line feed following { of F.p.toString output for dynamic functions (#847)
This is a continuation of 4a5c52beb5c1c12540974ed697e75bfe5c500578.
2017-02-07 11:06:37 -05:00
Michael Ficarra
9737f3704f Function.prototype.toString no longer does line terminator normalisation (#820) 2017-01-09 14:25:02 -08:00
Michael Ficarra
4a5c52beb5 add line feeds following { of F.p.toString output for dynamic functions (#803)
This aligns the tests with this recent change to the F.p.toString proposal:
7432ded0e6
2016-12-06 12:23:05 -05:00
Simon Richter
08071715e4 Add missing operator in test (#804)
Automatic Semicolon Insertion hides an error here by transforming a long
ReturnStatement into a ReturnStatement followed by an ExpressionStatement
that is never reached. The conditions on the second line are thus never
tested.
2016-12-06 12:22:29 -05:00
jugglinmike
71e573f7da Add tests for realm interactions (#688)
* Add tests for prototype realm inference

* Add tests for miscellaneous realm concerns

* Add tests for realm of spec-created Errors

In some cases, Error objects produced by the specification are
observable from ECMAScript code. Among these cases, some are further
differentiated in that they occur outside of any built-in function and
may be triggered through syntactic production directly. The current
realm record is commonly interpreted incorrectly under these
circumstances.

Add tests asserting that the expected realm record is used when
constructing such Error objects.

* Add tests for realm use in ArraySpeciesCreate

* Add tests for function realm retrieval

* Add tests for cross-realm behaviors of Symbols

* Add tests for GetValue and PutValue

* Add tests for realm of spec-created Arrays

In some cases, Arrays produced by CreateArrayFromList are observable
from ECMAScript code. Among these cases, two occur outside of any
built-in function and may be triggered through syntactic production
directly. The current realm record is commonly interpreted incorrectly
under these circumstances.

Add tests asserting that the expected realm record is used when
constructing arrays.

* Add test for spec-created object

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for prototype realm inference

* fixup! Add tests for miscellaneous realm concerns
2016-10-24 10:43:17 -07:00
jugglinmike
c5cbf4122d Improve coverage for section 9 (#726)
* Assert creation of 'arguments' object

Ensure that the 'arguments' object is created in cases where it is not
required by the body but is required by the parameters.

* Add tests for cases that disable "arguments" map

* Add tests for NewTarget override of bound function

* Add test for properties of exotic String objects
2016-08-05 10:07:02 -07:00
Brian Terlson
dbf251586e Add tests for async functions
Closes #479
2016-07-28 15:11:28 -07:00
Mike Pennisi
c0a3b2db7d Relax test for forbidden extension
According to ES2015, functions created using the FunctionDeclaration
syntax may define "own" properties named "caller" and "arguments" as
long as this is done using the AddRestrictedFunctionProperties abstract
operation.

Remove the assertions that prohibit this extension.
2016-06-14 15:26:12 -04: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
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
André Bargull
ca61d9b876 Add missing tests for "length" and "name" properties of built-in functions
Note: Already uses the updated DataView function lengths from tc39/ecma262#266 (ES2016 Draft 2015-12-20)
2016-01-15 18:12:05 +01:00
André Bargull
ffec41b7af Improve compatibility for engines without support for Annex B 2015-09-07 20:40:09 +02:00
Rick Waldron
9ccc663936 Merge pull request #415 from anba/remove-runTestCase-finally
Replace runTestCase when used with try-finally
2015-09-04 15:20:26 -04:00