From b562721e1db541d31659fa5fa529ea3b3ca10b88 Mon Sep 17 00:00:00 2001 From: Brent Baker Date: Thu, 6 Jun 2013 07:48:30 -0400 Subject: Bug 1129: Move Date.prototype.toGMTString into annexB --HG-- rename : test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js => test/suite/annexB/B.2.6.js --- test/suite/annexB/B.2.6.js | 21 +++++++++++++++++++++ test/suite/annexB/B.2.6.propertyCheck.js | 16 ++++++++++++++++ test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js | 3 --- .../ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js | 21 --------------------- 4 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 test/suite/annexB/B.2.6.js create mode 100644 test/suite/annexB/B.2.6.propertyCheck.js delete mode 100644 test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js diff --git a/test/suite/annexB/B.2.6.js b/test/suite/annexB/B.2.6.js new file mode 100644 index 000000000..84a223a7a --- /dev/null +++ b/test/suite/annexB/B.2.6.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path annexB/B.2.6.js + * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString) + */ + + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toGMTString"); + if (desc.value === Date.prototype.toGMTString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.6.propertyCheck.js b/test/suite/annexB/B.2.6.propertyCheck.js new file mode 100644 index 000000000..339ee5367 --- /dev/null +++ b/test/suite/annexB/B.2.6.propertyCheck.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Check type of various properties + * + * @path annexB/B.2.6.propertyCheck.js + * @description Checking properties of the Date object (toGMTString) + */ + +if (typeof Date.prototype.toGMTString !== "function") $ERROR('#1: typeof Date.prototype.toGMTString === "function". Actual: ' + (typeof Date.prototype.toGMTString )); +if (typeof Date.prototype['toGMTString'] !== "function") $ERROR('#2: typeof Date.prototype["toGMTString"] === "function". Actual: ' + (typeof Date.prototype["toGMTString"] )); + + + + diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js index 6b142a491..409d49e58 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js @@ -89,9 +89,6 @@ if (typeof Date.prototype.toLocaleString !== "function") $ERROR('#81: typeof Da if (typeof Date.prototype['toLocaleString'] !== "function") $ERROR('#82: typeof Date.prototype["toLocaleString"] === "function". Actual: ' + (typeof Date.prototype["toLocaleString"] )); if (typeof Date.prototype.toUTCString !== "function") $ERROR('#83: typeof Date.prototype.toUTCString === "function". Actual: ' + (typeof Date.prototype.toUTCString )); if (typeof Date.prototype['toUTCString'] !== "function") $ERROR('#84: typeof Date.prototype["toUTCString"] === "function". Actual: ' + (typeof Date.prototype["toUTCString"] )); -if (typeof Date.prototype.toGMTString !== "function") $ERROR('#85: typeof Date.prototype.toGMTString === "function". Actual: ' + (typeof Date.prototype.toGMTString )); -if (typeof Date.prototype['toGMTString'] !== "function") $ERROR('#86: typeof Date.prototype["toGMTString"] === "function". Actual: ' + (typeof Date.prototype["toGMTString"] )); - diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js deleted file mode 100644 index 1619d79d4..000000000 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toGMTString"); - if (desc.value === Date.prototype.toGMTString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); -- cgit v1.2.1