diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-date.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-date.js b/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-date.js new file mode 100644 index 0000000000..7123fe988d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/prototype/toString/Object.prototype.toString.call-date.js @@ -0,0 +1,19 @@ +// 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(new Date()), + "[object Date]", + "Object.prototype.toString.call(new Date()) returns [object Date]" +); +assert.sameValue( + Object.prototype.toString.call(Object(new Date())), + "[object Date]", + "Object.prototype.toString.call(Object(new Date())) returns [object Date]" +); + +reportCompare(0, 0); |