Mike Pennisi
b698c8b3ab
Add tests for Math constants
...
Closes gh-540
Because the specific value of each constant is specified as a
host-defined approximation, only the value type may be enforced by
Test262.
2016-04-18 14:39:37 -04:00
Mike Pennisi
f7aa31b41f
Remove over-specified tests
...
Except for a small set of expected input/output pairs, both ES5 and
ES2015 define the expected return value of these methods in terms of an
"implementation-dependent approximation." This makes it inappropriate to
enforce expectations for specific values, even if expressed imprecisely.
2016-04-18 14:36:49 -04:00
dtig
20d37a6f2f
Add SIMD test suite and utility functions ( #442 )
2016-04-18 14:26:15 -04:00
Leonardo Balter
e451026965
Fix minor typo on a test for Array#fill
2016-04-12 19:48:54 -04:00
Leonardo Balter
f3cc1fb983
Add tests for TypedArrays map
2016-04-12 15:41:38 -04:00
Leonardo Balter
e01371e12a
Add tests for TypedArrays forEach
2016-04-12 15:41:34 -04:00
Jordan Harband
45e5fc8889
Add `System.global` tests ( #567 )
2016-04-12 14:37:10 -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
c15079e741
Remove surface tests for %TypedArray%.prototype.toString
...
Because Test262 asserts the strict equality of
`Array.prototype.toString` and `TypedArray.prototype.toString`, tests
for properties of the object do not need to be reproduced in both
location.
Ref gh-526
2016-04-07 11:36:15 -04:00
Jordan Harband
c95e673feb
Add tests for `String#padStart` and `String#padEnd`.
...
https://github.com/tc39/proposal-string-pad-start-end/issues/23
Closes gh-564
2016-04-06 15:13:52 -04:00
Leonardo Balter
755b0d6117
Add tests for typedArrays extensibility
...
Ref: https://github.com/tc39/test262/pull/536#issuecomment-200455389
2016-04-01 15:34:14 -04:00
Leonardo Balter
3cb20b9df5
Add tests for internal methods of typedArray instances
...
Test specific behaviour for Integer Indexed exotic objects, WRT the
following internal methods:
- [[GetOwnProperty]]
- [[HasProperty]]
- [[DefineOwnProperty]]
- [[Get]]
- [[Set]]
- [[OwnPropertyKeys]]
2016-03-28 10:38:24 -04:00
Leonardo Balter
887b379421
Add tests for ArrayBuffer.isView
2016-03-24 12:14:26 -04:00
Leo Balter
35b93bb5c2
Merge pull request #548 from bocoup/random-fp
...
Avoid false positives
2016-03-24 10:49:44 -04:00
Leonardo Balter
ce503e638f
Add tests for detached buffer validation on TypedArray methods
2016-03-23 12:13:41 -04:00
Leonardo Balter
7499d3c208
Add missing surface tests for %TypedArray%.prototype.includes
2016-03-21 14:28:44 -04:00
Leonardo Balter
83b27c9beb
Add validation tests for TypedArray instance methods
2016-03-21 11:04:26 -04:00
Leonardo Balter
b26190f1ce
Add tests for TypedArray instance iterator methods
2016-03-21 11:04:25 -04:00
Leo Balter
0000bcd78c
Merge pull request #533 from bocoup/safe-integers
...
Add tests for Number.{MAX,MIN}_SAFE_INTEGER
2016-03-17 17:32:38 -04:00
Mike Pennisi
6e61c27aa5
Avoid false positives
...
As written, the test for `Math.random` would pass if the runtime
erroneously produced a non-numeric value. Add the necessary assertions
to guard against this case.
2016-03-17 17:12:54 -04:00
Leo Balter
86ff467767
Merge pull request #525 from anba/throw-type-error
...
Improve coverage %ThrowTypeError% and default class constructors
2016-03-17 16:31:37 -04:00
Leo Balter
5357b1585b
Merge pull request #504 from bocoup/explicit-async
...
Make asynchronous test configuration explicit
2016-03-17 15:28:08 -04:00
Mythri
6376e4d833
Removes special handling for UTC timezon in toISOString/15.9.5.43-0-13.js
2016-03-10 15:38:33 +00:00
Mike Pennisi
cb19235ba4
Add tests for Number.{MAX,MIN}_SAFE_INTEGER
2016-03-09 12:21:29 -05:00
Gorkem Yakin
6e912b0825
Merge pull request #518 from anba/typedarray_getownpropdesc_fixes
...
Fix test bugs
2016-03-02 13:22:29 -08:00
Leonardo Balter
7445d77d6d
Update descriptor tests for %TypedArray%.prototype properties
2016-03-02 13:15:03 -08:00
Leonardo Balter
02cdfacd31
Add tests for %TypedArray%.prototype get methods
...
Includes buffer, byteLength, byteOffset, length, and @@toStringTag
2016-03-02 13:15:01 -08:00
Leonardo Balter
6c56658974
Add tests for _TypedArray_.prototype methods
2016-03-01 15:36:34 -05:00
André Bargull
c46f5ff4b7
Increase coverage for %ThrowTypeError%
2016-03-01 19:13:43 +01:00
André Bargull
1517615a21
Fix test bugs
2016-02-23 18:55:06 +01:00
Rick Waldron
104a134bc2
restore "info"
2016-02-22 16:41:45 -05:00
Rick Waldron
2a962f74be
id => esid
2016-02-22 14:47:47 -05:00
Rick Waldron
2a112a3190
Exponentiation Operator tests
2016-02-22 14:47:47 -05:00
Leonardo Balter
bf782c8421
s/id/esid
...
Fixes #477
2016-02-22 09:47:42 -05:00
Gorkem Yakin
bd33b2b8e5
Merge pull request #509 from bocoup/typedarray-object-set
...
Add tests for _TypedArrays_(object) using object properties
2016-02-19 16:33:40 -08:00
Jordan Harband
d530c87b41
Create `proxyTrapsHelper` to throw on all traps by default.
2016-02-13 15:56:47 -08:00
Leonardo Balter
c82ab8cdbd
Add extra tests for _TypedArrays_(object) using object properties
2016-02-13 03:55:53 -02:00
Gorkem Yakin
dbcc8cadf3
Merge pull request #507 from bocoup/remove-unused-file
...
Remove unused harness file
2016-02-12 17:16:01 -08:00
Gorkem Yakin
eeb44cbe09
Merge pull request #500 from bocoup/prms-guard-thenable-opt
...
Promise: Add tests to disallow faulty optimization
2016-02-12 17:06:34 -08:00
Gorkem Yakin
5de18ae0b6
Merge pull request #501 from bocoup/prms-then-ctor-access-count
...
Promise: Add test for constructor access count
2016-02-12 16:54:20 -08:00
Gorkem Yakin
428418d5c7
Replace remaining es7id tags with id
2016-02-12 16:27:10 -08:00
Leonardo Balter
ebda746e6a
Replace es7id tags with id
2016-02-12 16:22:56 -08:00
Leonardo Balter
76080eac08
Reuse %TypedArray%.from and .of tests on each TypedArray constructor
2016-02-12 16:02:36 -08:00
Leonardo Balter
048073a29a
Add tests for _TypedArray_.from and of
2016-02-12 16:02:36 -08:00
Leonardo Balter
35dce20ec4
Update tests for %TypedArray%.from and of
2016-02-12 16:02:36 -08:00
Gorkem Yakin
02cbd01bfb
Merge pull request #486 from bocoup/object-setprototypeof
...
Add tests for [[SetPrototypeOf]] on immutable prototype exotic objects
2016-02-12 14:59:25 -08:00
Gorkem Yakin
ac7711e95f
Merge pull request #485 from bocoup/typedarray-constructor
...
Add tests for _TypedArray_ constructors
2016-02-12 14:47:48 -08: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
Mike Pennisi
23d566209a
Make asynchronous test configuration explicit
...
For asynchronous tests, the contract between test file and test runner
is implicit: runners are expected to inspect the source code for
references to a global `$DONE` identifier.
Promote a more explicit contract between test file and test runner by
introducing a new frontmatter "tag", `async`. This brings asynchronous
test configuration in-line with other configuration mechanisms and also
provides a more natural means of test filtering.
The modifications to test files was made programatically using the
`grep` and `sed` utilities:
$ grep "\$DONE" test/ -r --files-with-match --null | \
xargs -0 sed -i 's/^\(flags:\s*\)\[/\1[async, /g'
$ grep "\$DONE" test/ -rl --null | \
xargs -0 grep -E '^flags:' --files-without-match --null | \
xargs -0 sed -i 's/^---\*\//flags: [async]\n---*\//'
2016-02-12 13:03:19 -05:00
Leonardo Balter
df2d760d60
Add tests for Object.prototype extensibility and its immutable prototype
...
Object.prototype is extensible and an immutable prototype exotic object,
it's [[Prototype]] value is null
Ref tc39/ecma262#308
2016-02-12 13:10:46 -02:00
Mike Pennisi
e3fae6eeb4
Promise: Add test for constructor access count
...
Assert that the `constructor` property of the "this" value of
`Promise.prototype.then` is accessed exactly once. This guards against
implementations where repeated access is used instead of reference
passing (possibly motivated by convenience).
Repeated access of this kind was demonstrated by V8's implementation of
the specification:
https://bugs.chromium.org/p/v8/issues/detail?id=4539
2016-02-10 13:56:55 -05:00
Mike Pennisi
219bdc6f73
Promise: Add tests to disallow faulty optimization
...
Add tests that assert behavior when a Promise is resolved with another
Promise whose `then` method has been overridden. Because all objects
with a `then` method are treated equivalently, the presence of a
[[PromiseState]] internal slot should have no effect on program
behavior.
These tests guard against a faulty optimization originally implemented
in V8:
https://bugs.chromium.org/p/v8/issues/detail?id=3641
2016-02-10 13:38:03 -05:00
Leonardo Balter
26785d40ca
Add tests for zero conversion on Array#indexOf and Array#lastIndexOf
...
Fixes #435
2016-02-05 19:17:26 -02:00
Leonardo Balter
75952beee2
Move test file from TypedArray to TypedArrays folder
2016-02-05 11:58:55 -02:00
Leonardo Balter
0a30413b49
fixup! rename test files + review fixes
2016-02-05 11:53:33 -02:00
Leonardo Balter
d033b160cb
fixup! Add tests for TypedArrays constructors
2016-02-05 11:53:32 -02:00
Leonardo Balter
7a8120fb63
fixup! Add tests for TypedArrays constructors
2016-02-05 11:53:32 -02:00
Leonardo Balter
f8a4229bfd
Add tests for TypedArrays constructors
2016-02-05 11:53:32 -02:00
Leonardo Balter
4bdd808d04
Update %TypedArray% function length
2016-02-05 11:53:32 -02:00
Leonardo Balter
7d715a4ef1
Revalidate basic call tests for ES2016 %TypedArray% constructor
2016-02-05 11:53:31 -02:00
Jordan Harband
cf83ad5e73
s/esid/id/g
2016-02-01 23:44:48 -08:00
Jordan Harband
940d8698d1
Add test with duplicate keys.
...
Per https://github.com/tc39/test262/pull/484#issuecomment-178145781
2016-02-01 16:57:31 -08:00
Jordan Harband
0a5e8372aa
Review feedback.
2016-02-01 10:44:25 -08:00
Jordan Harband
cf578d5190
Add Object.getOwnPropertyDescriptors tests.
2016-02-01 01:45:23 -08:00
Leonardo Balter
efced6eb32
Add test to assert Reflect.enumerate is now undefined
...
Ref #495
2016-02-18 16:40:00 -05:00
Leonardo Balter
65241f1e93
Add test to assert Proxy enumerate trap is not triggered anymore
...
Ref #495
2016-02-18 16:39:41 -05:00
Leonardo Balter
63c1f1ca88
Remove tests for Reflect.enumerate
...
Ref #495
2016-02-18 15:57:14 -05:00
Leonardo Balter
e223738369
Remove tests for Proxy enumerate
...
Ref #495
2016-02-18 15:57:14 -05:00
Leonardo Balter
a61fca93fa
Fix test for TypedArrays.from on callable function
...
TypedArrays constructors are still callable even if they trigger a
TypeError Exception when a new target is not defined
2016-02-18 13:39:49 -05:00
Leonardo Balter
e3c5f66a40
Fix case sentitive error on test/built-ins/Object folder
...
Fixes gh-482
2016-01-29 10:02:25 -05:00
Tom Schuster
97c61513d8
Stop test262 from hanging Spidermonkey with an unimportant error message
2016-01-23 17:41:59 +01:00
Leonardo Balter
1a64295a0b
Replace TypedArray constructor invalid length test for ES2016 specs
...
Replace a ES2015 test where calling the TypedArray constructor with
a floating number triggered a RangeError. Within the ES2016 specs,
the same call will trigger a TypeError, as the result for
`SameValue(NewTarget, here)` will be checked before.
2016-01-21 10:41:16 -05:00
Mike Pennisi
8f8b663ce7
Add tests for TypedArray intrinsic
2016-01-21 10:41:16 -05:00
Gorkem Yakin
738a24b109
Merge pull request from jugglinmike/improve-promise-coverage-resolve ( closes #463 )
2016-01-19 16:33:23 -08:00
Mike Pennisi
b1b4f04494
Add tests for Promise Resolve Functions
...
Remove files that tested both PerformPromiseThen and
PromiseResolveFunction in favor of new tests that test
PromiseResolveFunction more directly and completely.
2016-01-19 16:32:36 -08:00
Gorkem Yakin
4a862fba95
Merge pull request #465 from jugglinmike/improve-promise-coverage-all-race
...
Improve Promise coverage: PerformPromiseAll & PeformPromiseRace
2016-01-15 16:19:18 -08:00
André Bargull
33395b52f5
Add basic surface tests for NativeErrors
2016-01-15 18:13:36 +01:00
André Bargull
1bac79fbf3
Add basic surface tests for TypedArrays
2016-01-15 18:13:08 +01:00
André Bargull
42edfd6e89
Add missing tests for "length" and "name" properties of %TypedArray% built-in functions
2016-01-15 18:12:42 +01: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
André Bargull
5e3eed63b9
Move Symbol.species and AnnexB tests to new subfolders
2016-01-15 18:11:03 +01:00
Gorkem Yakin
cd60a6d83a
Merge pull request #464 from jugglinmike/improve-promise-coverage-cap
...
Improve Promise coverage: NewPromiseCapability
2016-01-13 16:49:47 -08:00
Gorkem Yakin
9d48bb0875
Merge pull request #462 from jugglinmike/improve-promise-coverage-reject
...
Improve Promise coverage: Promise Reject Function
2016-01-13 16:49:21 -08:00
Gorkem Yakin
8e76f6ca62
Merge pull request #461 from jugglinmike/improve-promise-coverage-then
...
Improve Promise coverage: Promise.prototype.then
2016-01-13 16:49:17 -08:00
Mike Pennisi
7fab70bb21
Add tests for Promise Reject Functions
2016-01-07 13:24:42 -05:00
Mike Pennisi
a5bf19486a
Extend coverage for PerformPromiseThen
2016-01-07 13:24:01 -05:00
Mike Pennisi
8e069e918f
Extend coverage for PromiseReactionJob
...
Add tests that assert sequential job execution
2016-01-07 13:24:01 -05:00
Mike Pennisi
eded6b269b
Extend tests to fully cover invocation concerns
...
Update test metadata to accurately describe the more complete set of
assertions.
2016-01-07 13:24:00 -05:00
Mike Pennisi
5f2ba2522f
Limit semantics under test
...
Because these tests concern the behavior of the PromiseReactionJob
abstract operation itself, they should avoid assumptions about the
correct implementation of that operation. Specifically: they should not
rely on the behavior of abupt completions returned from "reaction
handler" functions.
Re-implement tests to express control flow expectations using the
`$DONE` function only.
2016-01-07 13:23:54 -05:00
Mike Pennisi
5a8d1fdf77
Re-organize tests according to internal operations
...
By organizing files according to the structure of the specification,
test coverage can be more methodically evaluated.
2016-01-07 13:01:25 -05:00
Mike Pennisi
29cdc4543f
Rename tests for PromiseReactionJob
...
Use names that describe the behavior (not the location in the
specification) as per the current convention.
2016-01-07 12:55:36 -05:00
Mike Pennisi
f01767916a
Rename tests for PerformPromiseThen
...
These tests concern the behavior of PerformPromiseThen for settled
Promises. That abstract operation behaves differently for pending
promises, so the file naming scheme should reflect this distinction in
order to support the future implementation of additional tests.
2016-01-07 12:55:31 -05:00
Mike Pennisi
615f42274d
Extend coverage for NewPromiseCapability
2016-01-07 12:42:44 -05:00
Mike Pennisi
6e9d88a293
Extend coverage for PerformPromiseRace
2016-01-07 12:42:21 -05:00
Mike Pennisi
bb26beece2
Extend coverage for PerformPromiseAll
2016-01-07 12:42:21 -05:00
Jordan Harband
f1d072dec2
Ensure verifyConfigurable is last, because side effects suck
2015-12-22 09:25:33 -08:00
André Bargull
b62dccf1dc
Add test cases for recent ES2016 fixes
...
- lastIndex in RegExp.prototype[Symbol.split]: tc39/ecma262@08b4756747
- Missing number conversion in DataView.prototype.setXXX: tc39/ecma262@4f875fe96d
- Negative zero byteoffset in TypedArray: tc39/ecma262@2d1ed20db7
- EvalDeclarationInstantiation throws TypeError: tc39/ecma262@2be6968715
- BindingRestElement allows BindingPattern: tc39/ecma262@d322357e6b
- Eval in parameters with computed property keys: tc39/ecma262@04e2e9b719
- Use strict with non-simple parameters: tc39/ecma262@15b0db41ed
- __proto__ in strict mode: tc39/ecma262@5c1984334d
2015-12-15 17:33:49 +01:00
Jordan Harband
17e9f3aa00
Add Proxy tests to ensure observable semantics are maintained
2015-12-14 17:00:33 -08:00
Jordan Harband
a9503d5543
Adding keys during enumeration should not result in their appearance.
...
Per 9bd1954950
and https://github.com/tc39/test262/pull/453#discussion_r47556411
2015-12-14 14:13:01 -08:00
Jordan Harband
3dea218911
Minor review feedback
2015-12-14 12:20:14 -08:00