diff options
author | Robin Templeton <robin@igalia.com> | 2017-10-02 16:13:09 -0400 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2017-10-02 16:13:09 -0400 |
commit | 5f338a30a127df80934f72adf6285ec3b5ed309e (patch) | |
tree | 621ae4a21a0c4b9125d4d95f89c7d08b4027b862 /harness | |
parent | 2889100f21876646bc4fb4c3c69e2290741d7c5c (diff) | |
download | qtdeclarative-testsuites-5f338a30a127df80934f72adf6285ec3b5ed309e.tar.gz |
Add tests for BigInt.prototype.valueOf (#1234)
* BigInt valueOf tests
* add features from typeCoercion.js
Diffstat (limited to 'harness')
-rw-r--r-- | harness/typeCoercion.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/harness/typeCoercion.js b/harness/typeCoercion.js index 7cd6a9de3..76d366d76 100644 --- a/harness/typeCoercion.js +++ b/harness/typeCoercion.js @@ -407,3 +407,19 @@ function testNotCoercibleToBigInt(test) { testStringValue("0xg"); testStringValue("1n"); } + +function testCoercibleToBigIntThisValue(value, test) { + test(value); + test(Object(value)); +} + +function testNotCoercibleToBigIntThisValue(test) { + test(undefined); + test(null); + test(true); + test(false); + test(""); + test(Symbol("")); + test(0); + test({}); +} |