blob: 8e9f77955de4619ea9eabd01cd12d5d474b153fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// 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]"
);
reportCompare(0, 0);
|