summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2018-03-07 14:11:28 -0500
committerLeo Balter <leonardo.balter@gmail.com>2018-03-07 14:11:28 -0500
commit3af53b80871ab8f4585759d211bda5869e8fba01 (patch)
treea75d7eeb1e808eff79d0dff62b4de0f4dc855d23 /test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js
parent3207bf74d0b6c4249cd85b83bf4bb64c72f1ed2d (diff)
downloadqtdeclarative-testsuites-3af53b80871ab8f4585759d211bda5869e8fba01.tar.gz
test/built-ins/Object/prototype/toString/*.js: clean up and extended fixes from gh-1473 (#1475)
Diffstat (limited to 'test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js')
-rw-r--r--test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js b/test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js
new file mode 100644
index 000000000..520d3aeaf
--- /dev/null
+++ b/test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js
@@ -0,0 +1,27 @@
+// Copyright 2018 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-object.prototype.tostring
+description: has a [[RegExpMatcher]] internal slot, let builtinTag be "RegExp".
+---*/
+assert.sameValue(
+ Object.prototype.toString.call(/./),
+ "[object RegExp]",
+ "Object.prototype.toString.call(/./) returns [object RegExp]"
+);
+assert.sameValue(
+ Object.prototype.toString.call(Object(/./)),
+ "[object RegExp]",
+ "Object.prototype.toString.call(Object(/./)) returns [object RegExp]"
+);
+assert.sameValue(
+ Object.prototype.toString.call(new RegExp()),
+ "[object RegExp]",
+ "Object.prototype.toString.call(new RegExp()) returns [object RegExp]"
+);
+assert.sameValue(
+ Object.prototype.toString.call(Object(new RegExp())),
+ "[object RegExp]",
+ "Object.prototype.toString.call(Object(new RegExp())) returns [object RegExp]"
+);