2133 Commits

Author SHA1 Message Date
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 c33bf0e0439e6f6bf084c1524d7df8d2b41c515d
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