diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2018-03-07 14:11:28 -0500 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2018-03-07 14:11:28 -0500 |
commit | 3af53b80871ab8f4585759d211bda5869e8fba01 (patch) | |
tree | a75d7eeb1e808eff79d0dff62b4de0f4dc855d23 /test/built-ins/Object/prototype/toString/Object.prototype.toString.call-regexp.js | |
parent | 3207bf74d0b6c4249cd85b83bf4bb64c72f1ed2d (diff) | |
download | qtdeclarative-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.js | 27 |
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]" +); |