summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorRobin Templeton <robin@igalia.com>2017-10-02 16:13:09 -0400
committerLeo Balter <leonardo.balter@gmail.com>2017-10-02 16:13:09 -0400
commit5f338a30a127df80934f72adf6285ec3b5ed309e (patch)
tree621ae4a21a0c4b9125d4d95f89c7d08b4027b862 /harness
parent2889100f21876646bc4fb4c3c69e2290741d7c5c (diff)
downloadqtdeclarative-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.js16
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({});
+}