Commit Graph

1404 Commits

Author SHA1 Message Date
Ioanna M. Dimitriou H 9e03c403e7 Test parsing error when using unicode escape sequences to express i, m, s
As suggested in https://github.com/tc39/test262/pull/3960#issuecomment-1966827213
2024-03-05 12:56:48 -08:00
Guillaume Emont 229a27bcbc Added new generated tests with uppercase I
Co-Authored-By: Ioanna M. Dimitriou H <idimitriou@igalia.com>
2024-03-05 12:56:48 -08:00
Cam Tenny 49a58a4716 Adds syntax tests for the RegExp modifiers proposal
Based on PR #3807 which had generated these tests from templates,
but was stuck due to issue #3808.

Co-Authored-By: Guillaume Emont <guijemont@igalia.com>
Co-Authored-By: Ioanna M. Dimitriou H <idimitriou@igalia.com>
2024-03-05 12:56:48 -08:00
Nicolò Ribaudo c0e8eef81b
Add test for async module not blocking sync siblings (#3955) 2024-02-21 14:53:10 +01:00
Lucas Mirelmann 403ee414ab
Fix comment in allow-nlt-before-with.js (#4001)
The proposed syntax allows a line terminator before the `WithClause`.
2024-02-09 16:36:41 -08:00
Nicolò Ribaudo bebce4a5ee Make sure that the test always throws a SyntaxError 2024-01-15 15:16:53 -08:00
Nicolò Ribaudo 8b1bd25b49 Do not expect specific error type in import-attributes/allow-nlt-before-with.js
Hosts are free to throw whatever error they want during module loading: there is no guarantee that the error thrown due to the import with `type: "foo"` is a SyntaxError.
2024-01-15 15:16:53 -08:00
Kevin Gibbons 67a5153cf5
add Float16Array to all generic TypedArray tests (#3849) 2024-01-10 14:07:57 +01:00
Kevin Gibbons 5a263f5b19 add the TypedArray feature flag to some tests which were missing it 2024-01-08 17:21:46 -08:00
Michael Dyck 816b6b14d8 Delete trailing space from "info: |" lines 2024-01-08 16:04:41 +01:00
Richard Gibson 2060494f28 Test for assignment with target wrapped in two sets of parentheses 2023-11-21 09:51:03 -05:00
Veera c1281dba45 Test for Unicode Escape in Literals 2023-10-31 16:57:41 -07:00
Nicolò Ribaudo 0a6dabf1e2 Add readmes 2023-10-26 18:21:19 -07:00
Nicolò Ribaudo 41515e87e5 Use import-attributes flag in new generated tests 2023-10-26 18:21:19 -07:00
Nicolò Ribaudo 3ddb9e5e95 Update import attributes tests to use the `with` keyword 2023-10-26 18:21:19 -07:00
Nicolò Ribaudo 06f6ae960a Copy all import assertions tests as a basis for import attributes tests 2023-10-26 18:21:19 -07:00
Daniel Minor 55e8cceb80 Revert "Revert "Fixup class names in class decorator private identifier tests.""
This reverts commit 31f703cbe69ec2e0fd4b94de2fdf505fb722b552.

The changes are needed to both the templates and the generated files.
2023-10-05 10:23:12 -07:00
Daniel Minor 3ef0777c04 Revert "Fixup class names in class decorator private identifier tests."
This changed the test files, not the templates used to generate the tests.
2023-10-05 10:23:12 -07:00
Daniel Minor 581de2d0f8 Fixup class names in class decorator private identifier tests.
For the statement level test, the inner class name is not initialized
at the time the decorators evaluate, resulting in a ReferenceError
that the declaration can not be accessed prior to initialization.

Similar, non-decorator code, like:
    class C {
        static dec() {}
        static {
            this.x = C.dec();
            class C {}
        }
    }
also results in a ReferenceError.

For the expression level test, the var C is undefined at the time the
decorators are evaluated, resulting in TypeError while trying to access
a member of undefined.

Similar, non-decorator code, like:
    var C = class {
        static f() {};
        static {
            this.x = C.f();
        }
    }
also results in a TypeError.
2023-10-05 10:23:12 -07:00
Alexey Shvayka be53234590
Test that `HasVarDeclaration` accounts for bindings created via `eval()` (#3914)
Co-authored-by: Alexey Shvayka <ashvayka@apple.com>
2023-09-28 18:16:33 +02:00
André Bargull 989377d62d Fix import assertions tests
- Correct file paths in "ensure-linking-error_FIXTURE.js"
- Remove no longer valid assertion in "import-assertion-empty.js".

See also #3919.
2023-09-25 08:33:51 -07:00
Mathias Bynens 59bad89898
Add Unicode v15.1.0-sensitive `IdentifierPart` tests (#3833)
Ref. https://github.com/tc39/ecma262/issues/3073
2023-09-15 12:27:42 +02:00
André Bargull 1bd99bf069 Remove excess leading whitespace 2023-09-13 16:05:40 +02:00
André Bargull c140af3cb3 Update other test/language tests to use verifyProperty 2023-09-13 16:05:40 +02:00
André Bargull a7ee7473b7 Use verifyProperty in language/arguments-object tests 2023-09-13 16:05:40 +02:00
André Bargull f2275d23f4 Use verifyProperty in language/literals tests 2023-09-13 16:05:40 +02:00
André Bargull e6f1feb04d Use verifyProperty in language/global-code tests 2023-09-13 16:05:40 +02:00
André Bargull 8ff30c73ce Use verifyProperty in language/eval-code tests 2023-09-13 16:05:40 +02:00
André Bargull 08a7b9d4b6 Use verifyProperty in language/expressions tests 2023-09-13 16:05:40 +02:00
André Bargull ff81dccfc3 Use verifyProperty in language/statements tests 2023-09-13 16:05:40 +02:00
Nicolò Ribaudo 1bb53aee3e
Update import attributes `assert` tests to current semantics (#3919)
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2023-09-13 11:35:06 +02:00
Nicolò Ribaudo 7ef1833109 Move all tests using import assertions to files named as such 2023-07-17 16:32:25 +02:00
Michael Dyck f5c932144a Delete trailing space after `|`
I'm not sure if YAML disallows it,
but test262 avoids it.
2023-06-29 14:08:47 +02:00
José Julián Espina c4642dd714
Fix phase on some module tests (#3832) 2023-06-11 00:12:02 +02:00
Veera 88a2f0dcd1 Fix copyright 2023-05-18 11:19:31 -07:00
Veera 732cfff666 Fix YAML indentation 2023-05-18 11:19:31 -07:00
Veera bf337727a0 Try to fix CI errors 2023-05-18 11:19:31 -07:00
Veera 377231a1de Add tests for increment and decrement operations on `this` 2023-05-18 11:19:31 -07:00
Huáng Jùnliàng ff405fd0df update fixtures 2023-03-29 12:54:37 -07:00
José Julián Espina 4a6439e4a7
Add `Array.prototype.includes` and `exponentiation` features (#3799) 2023-03-23 10:51:08 +01:00
Cam Tenny 4fe158d39d Generated tests for refactoring (IIFE/async function).then(\$DONE, \$DONE); to use asyncTest 2023-02-21 11:04:09 -08:00
Cam Tenny 4d9d5c570d Refactor simple cases of (IIFE/async function).then(\$DONE, \$DONE); to use asyncTest 2023-02-21 11:04:09 -08:00
Huáng Jùnliàng 58b3321dba remove invalid element decorator yield reference tests 2023-01-03 12:33:04 -08:00
Philip Chimento e7895c53d2 Rebuild generated tests
This adds new tests because the tests that previously had name conflicts
are now renamed.
2022-11-30 16:04:02 -08:00
Philip Chimento cc559ac106 Rebuild generated tests 2022-11-30 16:04:02 -08:00
Philip Chimento d87a7da6e1 Replace Object.hasOwnProperty.call with Object.prototype.hasOwnProperty.call
While we're at it, use assert() instead of assert.sameValue() for brevity,
if we are not specifically testing that the return value of hasOwnProperty
is the value true or false; and add more informative assertion messages to
help with debugging.

In some cases, the Object.hasOwnProperty.call could be replaced with
verifyProperty(), if the property descriptor was also being verified at
the same time.

This fixes some tests that were faulty to begin with: a common mistake was
Object.hasOwnProperty(obj, prop) which is probably going to return false
when that's not what you want.

The only instances left of `Object.hasOwnProperty` are one regression test
in implementation-contributed which I can't tell if it was intentionally
needed to trigger the regression, and a few instances of
`Object.hasOwnProperty('prototype')` which would defeat the purpose to
convert into `Object.prototype.hasOwnProperty.call(Object, 'prototype')`
form.

Closes: #3524
2022-11-30 16:04:02 -08:00
Rick Waldron e04de94c07 Line Terminator test description corrections 2022-11-08 10:37:37 -08:00
Gokhan Kurt f5369c26a4 add async-functions feature to files which should have it 2022-10-17 11:21:23 +02:00
Mathias Bynens e79a1935ed
Add tests for Unicode v15 Identifier{Start,Part} (#3662)
Issue: https://github.com/tc39/ecma262/issues/2904
2022-09-21 11:24:26 +02:00
Kevin Gibbons 746197355c
Implement changes for "avoid mostly-redundant `await` in async `yield*`" (#3619) 2022-09-06 13:21:50 +02:00