From 7ac2aa06caa6bbc10790105e2217c73c40abfa9f Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Tue, 5 Jul 2016 14:52:17 -0400 Subject: [PATCH] Add test for `name` property of Date constructor --- test/built-ins/Date/name.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/built-ins/Date/name.js diff --git a/test/built-ins/Date/name.js b/test/built-ins/Date/name.js new file mode 100644 index 0000000000..da2ce1be2a --- /dev/null +++ b/test/built-ins/Date/name.js @@ -0,0 +1,24 @@ +// Copyright (c) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-date-constructor +es6id: 20.3.2 +description: Constructor "name" property descriptor +info: > + 17 ECMAScript Standard Built-in Objects: + + Every built-in Function object, including constructors, that is not + identified as an anonymous function has a name property whose value is a + String. + + Unless otherwise specified, the name property of a built-in Function object, + if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: + false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Date.name, "Date"); + +verifyNotEnumerable(Date, "name"); +verifyNotWritable(Date, "name"); +verifyConfigurable(Date, "name");