summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-object.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-object.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-object.js b/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-object.js
new file mode 100644
index 0000000000..755744dd8d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-object.js
@@ -0,0 +1,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);