Commit Graph

114 Commits

Author SHA1 Message Date
Adrian Heine 21f6a86a6d Remove explicit sta.js includes
INTERPRETING.md states that sta.js has to be included unconditionally.
2018-10-15 12:45:55 -04:00
Mathias Bynens 75e8a317a2 Remove assert.throws.early
Negative tests are the better approach for early error tests.

Closes #1622.
2018-08-07 14:35:13 +02:00
Rick Waldron 338688bb57 testTypedArray.js: enforce order of TypedArrays 2018-04-19 15:09:39 -04:00
André Bargull ea6c18c5e2 Don't compute NaN values in functions (#1503)
`function nan() { return /* expression to compute NaN */ }` may not return the same implementation-distinguishable NaN value before and after JIT compilation.
2018-03-22 20:20:29 -04:00
André Bargull 500e48e6ce Fix various test bugs (#1502)
Fixes #1492
2018-03-22 16:36:57 -04:00
Rick Waldron 2975694f86 Weaken tests about NaN canonicalization.
Fixes gh-1476
Closes gh-1484
2018-03-13 12:53:39 -04:00
Leo Balter 2712807027
Fix errors recently introduced. (#1448)
* Fix bad references on tests for BigInt TypedArrays

* Remove bad conversions for BigInt TypedArray

* Cleanup the BigInt TypedArray harness file

Remove non used code (testBigIntTypedArrayConversions)

Move the constructors list to inside the exposed function, this prevents early implementations to fail before the function is called.

* Fix bad references in TypedArrays.of (BigInt)

* Remove BigInt tests from typedarray harness test

* Use BigInt for BigInt typedArrays

* Apply last fixings on BigInt TypedArray tests

* Apply fixes to last revision from @anba
2018-02-27 14:58:56 -05:00
Robin Templeton 9232d65b30 BigInt TypedArray tests
- add @jakobkummerow's changes
- remove EOL whitespace
- use 'Array.isArray' instead of 'instanceof Array'
- check for BigInt type in toLocaleString tests
- specify TypedArray constructor list for non-BigInt tests
- update TypedArray harness test for BigInt
- add a missing type coercion
- disable more tests for Big(U)Int64Array
- check for BigInt before using BigInt TypedArray constructors
2018-02-15 16:45:05 -05:00
Rick Waldron 89ac510488 Frontmatter: fixup "description: |" to "description: >" 2018-01-05 12:29:17 -05:00
Rick Waldron 5155397373 Add missing features 2017-12-21 16:46:57 -05:00
André Bargull 48c3240580 Add test/harness file for isConstructor.js 2017-12-21 16:46:56 -05:00
André Bargull 266e0ffb66 Remove harness/testBuiltInObject.js file 2017-12-21 16:46:56 -05:00
Leo Balter d809fd0a4f Missing features in the test/harness files (#1222) 2017-09-11 16:36:58 -04:00
Leo Balter c41faf1aca Add missing Symbol features flags 2017-09-07 15:51:13 -04:00
Rick Waldron 4ea2931f16 Update all harness files to pass linting. (#1153)
```
$ python tools/lint/lint.py --whitelist lint.whitelist harness/*.js
Linting 25 files.
Linting complete. 0 errors found.
```

- Renames detachArrayBuffer-$262.detachArrayBuffer.js -> detachArrayBuffer-host-detachArrayBuffer.js (previous naming prevents command-click from terminal)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-07-14 11:37:24 -04:00
Rick Waldron 13dfae4da9 Fixes test/harness/nans.js
- correction to license
- use Number.isNaN

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron a6aa58a44f harness test: propertyHelper.js (error case)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 7eef084cf5 harness test: timer.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron c896312175 Update description in test/harness/sta-override-error.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 5165cc11cf harness test: testTypedArray.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 537ef01882 harness test: fnGlobalObject.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 1839050378 Removes relocated error.js tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 5f5e1655e1 harness test: nan.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 7c9b648d08 harness test: tcoHelper.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 8a5841acdc harness test: promiseHelper.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 3e85c608da harness test: sta.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 759ad854e9 harness test: detachArrayBuffer.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 8e360021b8 harness test: decimalToHexString.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 86f03a2ef8 harness test: dateConstants.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 27f3452b33 harness test: arrayContains.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Rick Waldron 2086f66c55 Update verifyProperty to allow checking `value`
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-23 11:58:16 -04:00
Rick Waldron 1a2244faf8 Fix all test/harness/*.js tests (#1068)
$ test262-harness --hostType=d8 -t 4 --hostPath=`which d8` test/harness/*.js
Ran 147 tests
147 passed
0 failed

$ test262-harness --hostType=node -t 4 --hostPath=`which node` test/harness/*.js
Ran 147 tests
147 passed
0 failed

$ test262-harness --hostType=jsshell -t 4 --hostPath=`which js` test/harness/*.js
Ran 147 tests
147 passed
0 failed

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-22 22:25:35 -03:00
Leo Balter 666f0e920a
Add assert.throws.early 2017-05-01 12:29:52 -04:00
Leo Balter e43ce56105 Add Verify Property harness (#979) 2017-04-15 12:56:29 -04:00
Leonardo Balter bc42c6ab5c Add harness for byte conversion values
Update testTypedArrayConversions to require byteConversionValues
2016-05-25 10:10:50 -04:00
Gorkem Yakin f6475d81bf Merge pull request #543 from bocoup/enumerable-helper
Fix verifyEnumerable helper to account for properties with Symbol values
2016-04-25 16:32:53 -07:00
jugglinmike ba3dacbe5a Correct tests for native functions' toString value (#580)
Modify the regular expression for native functions' toString value to
satisfy all test cases. Correct the test file's reference to the harness
file. Re-format the test file's assertions to aid debugging in the event
of failure.
2016-04-21 15:55:54 -04:00
jugglinmike cf68c3be91 Correct invalid tests for the Date constructor
The millisecond representation of a given Date instance is dependent on
the local system's time zone settings. In order to pass consistently
across contexts, tests for this value must take the system configuration
into account.

Introduce a test harness utility function to encapsulate these concerns.
Re-use this function across all test files that assert the exact
millisecond representation of Date instances.
2016-04-19 17:00:59 -04:00
Leonardo Balter e7f6cd7f86 assert.throws fails if second argument is not a function 2016-04-15 10:14:54 -04: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
Leonardo Balter a93ef42b56 Fix verifyEnumerable helper to account for Symbol properties 2016-03-15 10:13:52 -04:00
Leonardo Balter bf782c8421 s/id/esid
Fixes #477
2016-02-22 09:47:42 -05:00
Jordan Harband a6fad62d7c Last minute fixes 2016-02-19 11:27:31 -08:00
Jordan Harband 59dad9172b Make proxy traps helper test a bit more robust.
Per https://github.com/tc39/test262/pull/484#discussion_r53228232
2016-02-17 12:50:26 -08:00
Jordan Harband d530c87b41 Create `proxyTrapsHelper` to throw on all traps by default. 2016-02-13 15:56:47 -08:00
Mike Pennisi 29ecced632 Update handling of directive prologues
Some tests specifically concern the application of the `use strict`
directive as it appears in JavaScript source code. These tests should
*not* be run with the `onlyStrict` flag because relying on the test
runner to enable strict mode makes the semantics of the source code
irrelevant. Update these tests to use the `noStrict` flag.

Other tests concern language semantics that are only valid in strict
mode, but the mechanism for enabling strictness is inconseqential.
Update these tests to use the `onlyStrict` flag and remove any redundant
`use strict` directive prologues contained within.

Still other tests are valid both within and outside of strict mode.
In keeping with the majority of other tests, do not specify any
restrictions on the environments in which these tests may be run.
2015-06-18 17:38:34 -04:00
Mike Pennisi 3211e33199 Add tests for test harness 2015-04-22 18:38:40 -04:00
Brian Terlson 1f2f7d062f Move assert helper as well 2014-12-09 13:46:53 -08:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00
Domenic Denicola fa4c337570 Add assert.throws
Closes #57.
2014-12-05 14:41:04 -05:00