Commit Graph

24 Commits

Author SHA1 Message Date
Mike Pennisi 47ab262658 Throw distinctive errors for different failures
Prior to this patch, two distinct failure cases would produce the same
generic error message. Refactor the test logic to report the specific
condition which trigger failure.
2021-09-02 10:36:00 -04:00
Mickey Rose 603b10dbfa
avoid unnecessary calls to decimalToHexString() (#3170) 2021-09-01 17:26:54 -04:00
jugglinmike 49347e0cf9
Remove unreachable code (#3165)
* Remove unreachable code

* fixup! Remove unreachable code
2021-08-25 16:13:00 -04:00
Rick Waldron 1a30a69d12
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/decode*,test/built-ins/encode* (#3080) 2021-07-21 12:37:52 -07: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 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
Mike Pennisi 1f079a3525 Improve coverage: func props of the global object
Prior to this commit, the descriptors of the function 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
Leo Balter ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Ivan Vyshnevskyi 56e0ef70a5 Fix the ranges of non-HexDigits in decodeURI and decodeURIComponent tests 2018-07-20 14:59:31 -04:00
Rick Waldron b85474508c built-ins/decode/* - built-ins/eval/*: make all indentation consistent (depth & character) (#1423) 2018-02-15 15:50:18 -05:00
André Bargull f95b56ab28 Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722.
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
Justin Ridgewell da61938f8f Fix several Decode tests (#1357)
The tests are explicitly for bad hex chars at certain indexes, and that
rogue `%` was giving false positives.
2017-11-27 12:28:17 -05:00
Lyza Danger Gardner f3f2c4d47b Remove trailing whitespace 2017-06-29 15:49:49 -04:00
Lyza Danger Gardner b7daa23582 Add esid 2017-06-29 15:49:38 -04:00
André Bargull 94f6003d11 Optimize decodeURI/encodeURI tests (#987)
* Move decimalToHexString into harness instead of duplicating it in multiple files

* Optimize decimalToHexString and support numbers greater than 65535

* Replace alternative decimalToHexString function with include for decimalToHexString.js

* Add decimalToHex2String to return the string representation of a two-digit hex-number

* Replace decimalToHex2String with decimalToPercentHexString to return the percent hex-encoded string of a two-digit hex-number

* Replace two String.fromCharCode calls with a single call

* Further reduce string concatentations in decodeURI[Component] tests

* Remove unnecessary Test262Error error handling in catch-clauses

* Remove try/catch wrappings in decodeURI/encodeURI tests
2017-04-18 16:31:31 -04:00
André Bargull d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Mike Pennisi 071b5f03c6 Remove unused harness file
The harness file `Test262Error.js` has not contained executable code since it
was introduced in this project [1]. The definition of the `Test262Error`
function has consistently been located in the `sta.js` harness file which test
runners are expected to inject into the test environment.

Remove the file and all references to it.

[1] See commit c33bf0e043
2016-02-12 13:44:18 -05: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
Mike Pennisi 92890e6723 Remove `$FAIL` function
This function is equivalent to `$ERROR` (which is automatically included
in test environments). Remove the harness file that defines the
function, remove references to the file from test `includes` lists, and
update scripts to instead invoke the `$ERROR` function.
2015-06-09 19:44:25 -04:00
André Bargull 56036e4064 Enable strict mode for more built-in tests
- Remove no longer needed noStrict flags.
- Change tests to use propertyHelper.js for strict mode compatibility.
- Add tests for return value of `delete` operator, e.g. `delete Array.prototype === false`.
- Add non-writable tests for global NaN property.
- Split some tests to run in strict mode.
- Change tests with global `var length` declaration to use a different variable name for browser environments.
- Merge duplicated tests symbol-data-property-configurable-non-strict and symbol-data-property-configurable-strict.
- Merge duplicated tests symbol-data-property-writable-non-strict and symbol-data-property-writable-strict.
- (And a small change in propertyHelper to reduce code duplication in function call.)
2015-05-18 18:01:00 +02:00
André Bargull 9ece4f2de5 Fix strict mode errors in {decode, encode}URI[Component]
Add missing "var" declarations and noStrict flags.

Part of issue #35.
2015-04-29 17:44:25 +02:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00