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
30
31
32
33
34
35
36
37
38
39
|
// 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: is a String exotic object, let builtinTag be "String".
---*/
assert.sameValue(
Object.prototype.toString.call(""),
"[object String]",
"Object.prototype.toString.call(\"\") returns [object String]"
);
assert.sameValue(
Object.prototype.toString.call(Object("")),
"[object String]",
"Object.prototype.toString.call(Object(\"\")) returns [object String]"
);
assert.sameValue(
Object.prototype.toString.call(String("")),
"[object String]",
"Object.prototype.toString.call(String(\"\")) returns [object String]"
);
assert.sameValue(
Object.prototype.toString.call(Object(String(""))),
"[object String]",
"Object.prototype.toString.call(Object(String(\"\"))) returns [object String]"
);
assert.sameValue(
Object.prototype.toString.call(new String("")),
"[object String]",
"Object.prototype.toString.call(new String(\"\")) returns [object String]"
);
assert.sameValue(
Object.prototype.toString.call(Object(new String(""))),
"[object String]",
"Object.prototype.toString.call(Object(new String(\"\"))) returns [object String]"
);
reportCompare(0, 0);
|