summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-object.js
blob: 755744dd8d50e890517589c701a2669882310b2d (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
// 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: Else, let builtinTag be "Object".
---*/
assert.sameValue(
  Object.prototype.toString.call({}),
  "[object Object]",
  "Object.prototype.toString.call({}) returns [object Object]"
);
assert.sameValue(
  Object.prototype.toString.call(Object({})),
  "[object Object]",
  "Object.prototype.toString.call(Object({})) returns [object Object]"
);
assert.sameValue(
  Object.prototype.toString.call(new Object({})),
  "[object Object]",
  "Object.prototype.toString.call(new Object({})) returns [object Object]"
);

reportCompare(0, 0);