Commit Graph

149 Commits

Author SHA1 Message Date
Ms2ger 920a567b72 Improve is/toWellFormedString coverage. 2022-12-21 10:57:19 +01:00
Timothy Flynn f1fc5c6497 Fix typos in String.prototype.isWellFormed/String.prototype.toWellFormed
1. String.prototype.toWellFormed's name is "toWellFormed".

2. "asserts" does not exist in the test harness, and "assert.throws"
   expects the error type first.
2022-12-01 17:02:41 +01:00
Jordan Harband 30a5b38f23 `String.prototype.isWellFormed`/`String.prototype.toWellFormed`: add tests 2022-12-01 16:04:31 +01:00
Philip Chimento 27063ae219 Duplicate named capture groups: .groups and .indices.groups objects
These tests should cover the full functionality of the .groups object (and
the .indices.groups object, in the case of the /d flag) for RegExp.p.exec
and String.p.match:

- Matched DNCG has a result
- Unmatched DNCG is present and undefined
- DNCG matched in previous iteration but not in current iteration is
  treated as unmatched
- Iteration order of properties corresponds with source order

See: #3704
2022-11-02 15:22:58 +01:00
Richard Gibson 3ab8adc237 Require String.prototype.localeCompare to check for canonical equivalence 2022-03-29 16:43:22 -04:00
Rick Waldron d558af3ac0
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/String (#3093) 2021-07-21 13:36:17 -07:00
Ross Kirsling 73798cbc61
Fix typos for at/prop-desc tests. (#2908) 2020-11-19 02:32:38 -08:00
Leo Balter 2e5ff2461b fixup! Fix missing renames for item->at 2020-11-18 15:18:14 -05:00
Leo Balter 65bd4432f9 Fix missing renames for item->at
Ref #2905
2020-11-18 15:18:14 -05:00
Ross Kirsling df1bce9c2e Rename item() to at(). 2020-11-18 13:31:11 -05:00
Rick Waldron fd10123a71 String.prototype.split: rename overlong files. Fixes gh-2865 2020-10-19 10:22:45 -04:00
Rick Waldron d576baf73f Info: adds "sec-evaluatenew" step to info for all "not-a-constructor.js" tests. 2020-10-06 12:01:34 -04:00
Rick Waldron 8aacff591c Standardize built-in constructor testing 2020-10-06 12:01:34 -04:00
Rick Waldron c644ede430 Built-in function objects that are not identified as constructors must throw a TypeError exception when new'ed. Fixes gh-1739 2020-10-06 12:01:34 -04:00
Rick Waldron e3b12065b2 Coverage: Array.prototype.item, String.prototype.item, TypedArray.prototype.item. Closes gh-2809, gh-2810, gh-2811 2020-09-24 17:23:38 -04:00
devsnek bf205bac84 Remove annex b regex from main tests 2020-09-24 16:53:08 -04:00
Rick Waldron 16bf949629 Coverage: String.prototype.split method, regexp separator. Fixes gh-2813 2020-09-24 14:54:28 -04:00
Rick Waldron 834789514d Rename: legacy -> description 2020-09-24 14:54:28 -04:00
Rick Waldron e5fa1d5ef4 Transform: legacy $ERROR -> assert.* 2020-09-24 14:54:28 -04:00
Rick Waldron 82ee7a2cfb Coverage: String.prototype.replace method calls toString on replaceValue (regexp object). Fixes gh-2797 2020-09-22 10:37:20 -04:00
Rick Waldron d9a6a03ffc String.prototype.split: Add features meta data 2020-09-10 15:28:00 -04:00
Richard Gibson 93ff9b7262 Replace incorrect use of $DONOTEVALUATE 2020-08-21 15:58:21 -04:00
Richard Gibson 4f126a8ce9 Test the sequence of potentially abrupt steps in String.prototype.split 2020-08-21 15:58:21 -04:00
Richard Gibson 2dd3e50064 Fix confusing comment text 2020-08-21 15:58:21 -04:00
Leo Balter 1a7aee6ba0
Add missing coverage for String.prototype.split (#2632)
Fixes #2622
2020-05-20 19:25:07 -07:00
Alexey Shvayka 6fb6ff6ac5 Add String.prototype.split test 2020-04-09 09:48:21 -04:00
Alexey Shvayka 0c0bcef6ea Add String.prototype.search test 2020-04-09 09:48:21 -04:00
Alexey Shvayka 25978298a4 Add String.prototype.replaceAll test 2020-04-09 09:48:21 -04:00
Alexey Shvayka f21c828965 Add String.prototype.replace test 2020-04-09 09:48:21 -04:00
Alexey Shvayka d8a6a06dcd Add String.prototype.match test 2020-04-09 09:48:21 -04:00
Alexey Shvayka c1a7ffa2ef Rename searchValue-replace-method-abrupt.js 2020-04-09 09:48:21 -04:00
Alexey Shvayka 72c4433687 Add `replaceValue` evaluation order test 2020-02-05 15:08:07 -05:00
Alexey Shvayka 946a2a3fec Merge "length" tests 2020-02-05 15:08:07 -05:00
Leo Balter 3682ddd7e3
Add tests for String#replaceAll (#2423)
Fixes #2417
2019-11-18 10:22:07 -05:00
Jordan Harband 59d1af9d2a [matchAll] pass a global regex (#2399)
- also, expect the right kind of error in `flags-undefined-throws.js`

Fixes #2398
2019-10-09 10:32:39 -04:00
Jordan Harband f3e950e8ed tests for String.prototype.matchAll changes (#2389)
Per https://github.com/tc39/ecma262/pull/1716
2019-10-03 14:47:00 -04: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
Leo Balter ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Aleksey Shvayka 4838fc3167 Improve String#toString and String#valueOf coverage (#2160)
* toString: rename "length" test

* toString: use verifyProperty in "name" test

* toString: rename & merge non-generic tests

* toString: add cross-realm non-generic test

* toString: rename happy path tests

* valueOf: use verifyProperty in "length" test

* valueOf: use verifyProperty in "name" test

* valueOf: rename & merge non-generic tests

* valueOf: add cross-realm non-generic test

* valueOf: rename happy path tests

* toString: add indirect invocation tests

* valueOf: add indirect invocation tests
2019-05-22 17:47:15 -04:00
Leo Balter e403eea331 Fix false positives 2018-12-21 10:50:23 -05:00
Leo Balter 46c557247e Fix more false positives throwing TypeError in functions 2018-12-17 16:45:56 -05:00
Peter Wong c36bdcfeb3 Update tests for String.prototype.matchAll (#1990)
- Changes associated with spec changes (tc39/proposal-string-matchall#41)
- Update spec comments
- Added test verifying error thrown when `regexp[Symbol.matchAll]` is not callable
- Added test verifying `ToString` is called on `receiver`
2018-12-10 10:53:01 -05:00
Rick Waldron d98f3f4d63 Eliminate false positives: String.prototype.trimEnd, String.prototype.trimStart 2018-11-30 09:37:16 -05:00
Rick Waldron f1e362d558 Fix typos; generate tests (#1907) 2018-10-26 17:11:05 -04:00
André Bargull 3febd4c536 Update matchAll tests to reflect latest spec proposal 2018-09-26 10:38:35 -04:00
Kevin Gibbons 89ec038cf2 remove some trailing commas in calls 2018-09-21 10:04:33 -04:00
Leo Balter 6c2503a810
Adds String.fromCodePoint to the features list (#1606) 2018-06-21 16:03:08 -04:00
peterwmwong f1e45d9e5e
Fleshed out tests for Symbol.matchAll, String.p.matchAll, RegExp.p[@@matchAll], and %RegExpStringIteratorPrototype%
Tests were updated and assuming https://github.com/tc39/proposal-string-matchall/pull/33 will be merged.
2018-03-17 22:48:31 -05:00