86 Commits

Author SHA1 Message Date
Alexey Shvayka
f80d7e7777 Merge & refactor bound function "length" property descriptor tests 2020-08-20 12:38:45 -04:00
Alexey Shvayka
897a05954f Test "length" property descriptor of Function.prototype.bind 2020-08-20 12:38:45 -04:00
Gus Caplan
5f99d05c6a native function validator for your consideration 2020-08-04 19:44:31 -04:00
Gus Caplan
156186aee2 New NativeFunction tests 2020-08-04 19:44:31 -04:00
QuXing9
91a9abff4e
Add three testcases for test262 suite. (#2692)
* Add tests for escape function when parameter is not a string.

Fixes #2687
Fixes #2637

* Add test for indirect eval calls  when script is a for statement.

When for statement doesn't have a body, it should throw a SyntaxError.

Fixes #2661

* Add tests for Function Constructor when body contains usestrict.

Fixes #2688
Fixes #2638
2020-07-09 09:57:55 -07:00
Alexey Shvayka
43bc9f1465 Add Function test 2020-04-26 16:19:25 -04:00
Alexey Shvayka
fe0d4dc781 Fix bound function tests 2020-04-23 10:31:12 -04:00
Ross Kirsling
df7a0b0c89 Remove errant LF from CR line ending test again. 2020-03-02 13:38:35 -05:00
Gus Caplan
a53f43e1ce
add missing newlines in tests 2019-11-10 20:18:56 -08:00
Leo Balter
e2903e2648
Merge pull request #2366 from bocoup/unnecessary-includes
Remove unnecessary "includes" directives
2019-09-27 16:46:22 -04:00
Mike Pennisi
9cd62ffbd7 Improve coverage: ctor props of the global object
Prior to this commit, the descriptors of the constructor properties of
the global object were verified inconsistently, many independent
assertions occured in the same file, and that file test was poorly
located.

Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
2019-09-27 15:39:10 -04:00
Mike Pennisi
f26c2a11bd Remove unnecessary "includes" directives
The values defined by the referenced files are not used by these tests.
This makes their inclusion superfluous, which needlessly increases the
time to execute the tests and may confuse some readers.
2019-09-25 13:59:24 -04:00
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