diff options
Diffstat (limited to 'test/suite/ch15/15.2/15.2.3/15.2.3.14')
50 files changed, 1524 insertions, 1442 deletions
diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js index 05491bd71..7ec5d71ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js @@ -1,18 +1,18 @@ -/// 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.14/15.2.3.14-0-1.js
- * @description Object.keys must exist as a function
- */
-
-
-function testcase() {
- var f = Object.keys;
- if (typeof(f) === "function") {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.keys; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js index 6ddc02a0f..a2cd2e2f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js @@ -1,17 +1,17 @@ -/// 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.14/15.2.3.14-0-2.js
- * @description Object.keys must exist as a function taking 1 parameter
- */
-
-
-function testcase() {
- if (Object.keys.length === 1) {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.keys.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js index 68d0af18c..fb7db8874 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js @@ -1,22 +1,22 @@ -/// 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.14/15.2.3.14-1-1.js
- * @description Object.keys throws TypeError if type of first param is not Object
- */
-
-
-function testcase() {
- try {
- Object.keys(0);
- }
- catch (e) {
- if (e instanceof TypeError) {
- return true;
- }
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys throws TypeError if type of first param is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js index 7dce96b70..d99bf9b46 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-1-2.js
- * @description Object.keys throws TypeError if type of first param is not Object (boolean)
- */
-
-
-function testcase() {
- try {
- Object.keys(true);
- }
- catch (e) {
- if (e instanceof TypeError) {
- return true;
- }
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys throws TypeError if type of first param is not Object + (boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(true); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js index 191a34d43..728a20120 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-1-3.js
- * @description Object.keys throws TypeError if type of first param is not Object (string)
- */
-
-
-function testcase() {
- try {
- Object.keys('abc');
- }
- catch (e) {
- if (e instanceof TypeError) {
- return true;
- }
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys throws TypeError if type of first param is not Object + (string) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys('abc'); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js index 49a5c500b..a4d2b3f7c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-1-4.js
- * @description Object.keys throws TypeError if type of first param is not Object (null)
- */
-
-
-function testcase() {
- try {
- Object.keys(null);
- }
- catch (e) {
- if (e instanceof TypeError) {
- return true;
- }
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys throws TypeError if type of first param is not Object + (null) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(null); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js index 9bc567b4b..27fb6e1c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-1-5.js
- * @description Object.keys throws TypeError if type of first param is not Object (undefined)
- */
-
-
-function testcase() {
- try {
- Object.keys(undefined);
- }
- catch (e) {
- if (e instanceof TypeError) {
- return true;
- }
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys throws TypeError if type of first param is not Object + (undefined) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(undefined); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js index 9f4bd02b0..1bbb8614e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js @@ -1,20 +1,20 @@ -/// 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.14/15.2.3.14-2-1.js
- * @description Object.keys returns the standard built-in Array
- */
-
-
-function testcase() {
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
- if (Array.isArray(a) === true) {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys returns the standard built-in Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Array.isArray(a) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js index 2169d1d48..73d435e10 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js @@ -1,21 +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 ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js
- * @description Object.keys returns the standard built-in Array (check [[Class]]
- */
-
-
-function testcase() {
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
- var s = Object.prototype.toString.call(a);
- if (s === '[object Array]') {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys returns the standard built-in Array (check [[Class]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + var s = Object.prototype.toString.call(a); + if (s === '[object Array]') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js index 0dfbe1a7a..399dea52b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js @@ -1,24 +1,24 @@ -/// 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.14/15.2.3.14-2-3.js
- * @description Object.keys returns the standard built-in Array (Array overridden)
- */
-
-
-function testcase() {
- function Array() { }
-
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
-
- var s = Object.prototype.toString.call(a);
- if (s === '[object Array]') {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys returns the standard built-in Array (Array overridden) +includes: [runTestCase.js] +---*/ + +function testcase() { + function Array() { } + + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + + var s = Object.prototype.toString.call(a); + if (s === '[object Array]') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js index 9ce80ed94..39e308d9f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js @@ -1,20 +1,20 @@ -/// 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.14/15.2.3.14-2-4.js
- * @description Object.keys returns the standard built-in Array that is extensible
- */
-
-
-function testcase() {
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
- if (Object.isExtensible(a) === true) {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys returns the standard built-in Array that is extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Object.isExtensible(a) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js index 0469d5a97..51a7c89f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js @@ -1,20 +1,20 @@ -/// 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.14/15.2.3.14-2-5.js
- * @description Object.keys returns the standard built-in Array that is not sealed
- */
-
-
-function testcase() {
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
- if (Object.isSealed(a) === false) {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys returns the standard built-in Array that is not sealed +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Object.isSealed(a) === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js index 196835023..7bbd0ca15 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js @@ -1,20 +1,20 @@ -/// 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.14/15.2.3.14-2-6.js
- * @description Object.keys returns the standard built-in Array that is not frozen
- */
-
-
-function testcase() {
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
- if (Object.isFrozen(a) === false) {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys returns the standard built-in Array that is not frozen +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Object.isFrozen(a) === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js index e8611c9ee..02affcd09 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js @@ -1,33 +1,35 @@ -/// 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.14/15.2.3.14-2-7.js
- * @description Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable data or accessor properties
- */
-
-
-function testcase() {
- var obj = {};
-
- Object.defineProperty(obj, "prop1", {
- value: 1001,
- enumerable: false,
- configurable: true
- });
-
- Object.defineProperty(obj, "prop2", {
- get: function () {
- return 1002;
- },
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- return arr.length === 0;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable + data or accessor properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop1", { + value: 1001, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "prop2", { + get: function () { + return 1002; + }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js index f104f7ed4..9f7cee089 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js @@ -1,38 +1,40 @@ -/// 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.14/15.2.3.14-2-8.js
- * @description Object.keys - 'n' is the correct value when enumerable properties exist in 'O'
- */
-
-
-function testcase() {
- var obj = {
- prop1: 1001,
- prop2: function () {
- return 1002;
- }
- };
-
- Object.defineProperty(obj, "prop3", {
- value: 1003,
- enumerable: false,
- configurable: true
- });
-
- Object.defineProperty(obj, "prop4", {
- get: function () {
- return 1004;
- },
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- return (arr.length === 2) && (arr[0] === "prop1") && (arr[1] === "prop2");
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - 'n' is the correct value when enumerable properties + exist in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + prop1: 1001, + prop2: function () { + return 1002; + } + }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + get: function () { + return 1004; + }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + return (arr.length === 2) && (arr[0] === "prop1") && (arr[1] === "prop2"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js index 760e7edfd..4163bffb7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-3-1.js
- * @description Object.keys returns the standard built-in Array containing own enumerable properties
- */
-
-
-function testcase() {
- var o = { x: 1, y: 2};
-
- var a = Object.keys(o);
- if (a.length === 2 &&
- a[0] === 'x' &&
- a[1] === 'y') {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys returns the standard built-in Array containing own + enumerable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (a.length === 2 && + a[0] === 'x' && + a[1] === 'y') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js index f22b320bb..936c26576 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-3-2.js
- * @description Object.keys returns the standard built-in Array containing own enumerable properties (function)
- */
-
-
-function testcase() {
- function foo() {}
- foo.x = 1;
-
- var a = Object.keys(foo);
- if (a.length === 1 &&
- a[0] === 'x') {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys returns the standard built-in Array containing own + enumerable properties (function) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() {} + foo.x = 1; + + var a = Object.keys(foo); + if (a.length === 1 && + a[0] === 'x') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js index e12f7b022..5b57dd02c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js @@ -1,21 +1,23 @@ -/// 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.14/15.2.3.14-3-3.js
- * @description Object.keys returns the standard built-in Array containing own enumerable properties (array)
- */
-
-
-function testcase() {
- var o = [1, 2];
- var a = Object.keys(o);
- if (a.length === 2 &&
- a[0] === '0' &&
- a[1] === '1') {
- return true;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys returns the standard built-in Array containing own + enumerable properties (array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = [1, 2]; + var a = Object.keys(o); + if (a.length === 2 && + a[0] === '0' && + a[1] === '1') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js index d998bb0ef..7b64e1b95 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js @@ -1,32 +1,35 @@ -/// 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.14/15.2.3.14-3-4.js
- * @description Object.keys of an arguments object returns the indices of the given arguments
- */
-function testcase() {
- function testArgs2(x, y, z) {
- // Properties of the arguments object are enumerable.
- var a = Object.keys(arguments);
- if (a.length === 2 && a[0] in arguments && a[1] in arguments)
- return true;
- }
- function testArgs3(x, y, z) {
- // Properties of the arguments object are enumerable.
- var a = Object.keys(arguments);
- if (a.length === 3 && a[0] in arguments && a[1] in arguments && a[2] in arguments)
- return true;
- }
- function testArgs4(x, y, z) {
- // Properties of the arguments object are enumerable.
- var a = Object.keys(arguments);
- if (a.length === 4 && a[0] in arguments && a[1] in arguments && a[2] in arguments && a[3] in arguments)
- return true;
- }
- return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4);
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys of an arguments object returns the indices of the + given arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + function testArgs2(x, y, z) { + // Properties of the arguments object are enumerable. + var a = Object.keys(arguments); + if (a.length === 2 && a[0] in arguments && a[1] in arguments) + return true; + } + function testArgs3(x, y, z) { + // Properties of the arguments object are enumerable. + var a = Object.keys(arguments); + if (a.length === 3 && a[0] in arguments && a[1] in arguments && a[2] in arguments) + return true; + } + function testArgs4(x, y, z) { + // Properties of the arguments object are enumerable. + var a = Object.keys(arguments); + if (a.length === 4 && a[0] in arguments && a[1] in arguments && a[2] in arguments && a[3] in arguments) + return true; + } + return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js index 1f2c71d54..81ade0174 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js @@ -1,21 +1,20 @@ -/// 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.14/15.2.3.14-3-5.js
- * @description Object.keys must return a fresh array on each invocation
- */
-
-
-function testcase() {
- var literal = {a: 1};
- var keysBefore = Object.keys(literal);
- if (keysBefore[0] != 'a') return false;
- keysBefore[0] = 'x';
- var keysAfter = Object.keys(literal);
- return (keysBefore[0] == 'x') && (keysAfter[0] == 'a');
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys must return a fresh array on each invocation +includes: [runTestCase.js] +---*/ + +function testcase() { + var literal = {a: 1}; + var keysBefore = Object.keys(literal); + if (keysBefore[0] != 'a') return false; + keysBefore[0] = 'x'; + var keysAfter = Object.keys(literal); + return (keysBefore[0] == 'x') && (keysAfter[0] == 'a'); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js index 0e4044f5d..12eba61e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js @@ -1,19 +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 ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js
- * @description Object.keys - returns the standard built-in Array (instanceof Array)
- */
-
-
-function testcase() {
- var obj = {};
-
- var arr = Object.keys(obj);
-
- return arr instanceof Array;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - returns the standard built-in Array (instanceof + Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var arr = Object.keys(obj); + + return arr instanceof Array; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js index 8236ae44e..26d31792b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js @@ -1,33 +1,35 @@ -/// 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.14/15.2.3.14-3-7.js
- * @description Object.keys - length of the returned array equals the number of own enumerable properties of 'O'
- */
-
-
-function testcase() {
- var obj = { prop1: 1001, prop2: 1002 };
-
- Object.defineProperty(obj, "prop3", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
-
- Object.defineProperty(obj, "prop4", {
- get: function () {
- return 1003;
- },
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- return arr.length === 3;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - length of the returned array equals the number of + own enumerable properties of 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001, prop2: 1002 }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + get: function () { + return 1003; + }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.length === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js index 3deffaea3..5b4f869ab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js @@ -1,33 +1,33 @@ -/// 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.14/15.2.3.14-4-1.js
- * @description Object.keys - elements of the returned array start from index 0
- */
-
-
-function testcase() {
- var obj = { prop1: 1001, prop2: 1002 };
-
- Object.defineProperty(obj, "prop3", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
-
- Object.defineProperty(obj, "prop4", {
- get: function () {
- return 1003;
- },
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- return arr.hasOwnProperty(0) && arr[0] === "prop1";
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys - elements of the returned array start from index 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001, prop2: 1002 }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + get: function () { + return 1003; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop1"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js index cb754c44b..14540382e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js @@ -1,25 +1,27 @@ -/// 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.14/15.2.3.14-5-1.js
- * @description Object.keys - own enumerable data property of 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = { };
-
- Object.defineProperty(obj, "prop", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- return arr.hasOwnProperty(0) && arr[0] === "prop";
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable data property of 'O' is defined in + returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "prop", { + value: 1003, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js index d8a381d47..90c4f87cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js @@ -1,39 +1,42 @@ -/// 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.14/15.2.3.14-5-10.js
- * @description Object.keys - inherted enumerable accessor property that is over-ridden by non-enumerable own accessor property is not defined in returned array
- */
-
-
-function testcase() {
- var proto = {};
- Object.defineProperty(proto, "prop", {
- get: function () { },
- enumerable: true,
- configurable: true
- });
- var Con = function () { };
- Con.prototype = proto;
-
- var obj = new Con();
- Object.defineProperty(obj, "prop", {
- get: function () { },
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "prop") {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - inherted enumerable accessor property that is + over-ridden by non-enumerable own accessor property is not defined + in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { }, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js index 54b407eb4..fa1e26579 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js @@ -1,29 +1,31 @@ -/// 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.14/15.2.3.14-5-11.js
- * @description Object.keys - own enumerable indexed data property of dense array 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = [1, 2, 3, 4, 5];
-
- var arr = Object.keys(obj);
-
- var initValue = 0;
- for (var p in arr) {
- if (arr.hasOwnProperty(p)) {
- if (arr[p] !== initValue.toString()) {
- return false;
- }
- initValue++;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable indexed data property of dense array + 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [1, 2, 3, 4, 5]; + + var arr = Object.keys(obj); + + var initValue = 0; + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] !== initValue.toString()) { + return false; + } + initValue++; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js index 104d6c3c8..a578567da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js @@ -1,35 +1,37 @@ -/// 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.14/15.2.3.14-5-12.js
- * @description Object.keys - own enumerable indexed accessor property of dense array 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = [2, 3, 4, 5];
-
- Object.defineProperty(obj, "prop", {
- get: function () {
- return 6;
- },
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr.hasOwnProperty(p)) {
- if (arr[p] === "prop") {
- return true;
- }
- }
- }
-
- return false;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable indexed accessor property of dense + array 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [2, 3, 4, 5]; + + Object.defineProperty(obj, "prop", { + get: function () { + return 6; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] === "prop") { + return true; + } + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js index 4d723e82d..fd511d2e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js @@ -1,44 +1,46 @@ -/// 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.14/15.2.3.14-5-13.js
- * @description Object.keys - own enumerable indexed data property of sparse array 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = [1, , 3, , 5];
-
- Object.defineProperty(obj, 5, {
- value: 7,
- enumerable: false,
- configurable: true
- });
-
- Object.defineProperty(obj, 10000, {
- value: "ElementWithLargeIndex",
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- var index;
- var initValue = 0;
- for (index = 0; index < 3; index++) {
- if (arr[index] !== initValue.toString()) {
- return false;
- }
- initValue += 2;
- }
-
- if (arr.length !== 4 || arr[3] !== "10000") {
- return false;
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable indexed data property of sparse array + 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [1, , 3, , 5]; + + Object.defineProperty(obj, 5, { + value: 7, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, 10000, { + value: "ElementWithLargeIndex", + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + var index; + var initValue = 0; + for (index = 0; index < 3; index++) { + if (arr[index] !== initValue.toString()) { + return false; + } + initValue += 2; + } + + if (arr.length !== 4 || arr[3] !== "10000") { + return false; + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js index cb42e6a3a..136331ac0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js @@ -1,33 +1,35 @@ -/// 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.14/15.2.3.14-5-14.js
- * @description Object.keys - own enumerable indexed accessor property of sparse array 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = [1, , 3, , 5];
-
- Object.defineProperty(obj, "10000", {
- get: function () {
- return "ElementWithLargeIndex";
- },
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "10000") {
- return true;
- }
- }
-
- return false;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable indexed accessor property of sparse + array 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [1, , 3, , 5]; + + Object.defineProperty(obj, "10000", { + get: function () { + return "ElementWithLargeIndex"; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "10000") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js index b16750439..2ff6352b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js @@ -1,33 +1,35 @@ -/// 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.14/15.2.3.14-5-15.js
- * @description Object.keys - own enumerable indexed data property of String object 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = new String("xyz");
- obj[-20] = -20;
- obj[20] = 20;
-
- Object.defineProperty(obj, "prop", {
- value: 1003,
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var i = 0; i < arr.length; i++) {
- if (!obj.hasOwnProperty(arr[i])) {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable indexed data property of String + object 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new String("xyz"); + obj[-20] = -20; + obj[20] = 20; + + Object.defineProperty(obj, "prop", { + value: 1003, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var i = 0; i < arr.length; i++) { + if (!obj.hasOwnProperty(arr[i])) { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js index 835398932..a24585798 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js @@ -1,38 +1,40 @@ -/// 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.14/15.2.3.14-5-16.js
- * @description Object.keys - own enumerable indexed accessor property of String object 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = new String("xyz");
- obj[-20] = -20;
- obj[20] = 20;
-
- Object.defineProperty(obj, "prop1", {
- get: function () { },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(obj, "prop2", {
- get: function () { },
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var i = 0; i < arr.length; i++) {
- if (!obj.hasOwnProperty(arr[i])) {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable indexed accessor property of String + object 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new String("xyz"); + obj[-20] = -20; + obj[20] = 20; + + Object.defineProperty(obj, "prop1", { + get: function () { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(obj, "prop2", { + get: function () { }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var i = 0; i < arr.length; i++) { + if (!obj.hasOwnProperty(arr[i])) { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js index 52a0f0be7..2939df6bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js @@ -1,27 +1,29 @@ -/// 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.14/15.2.3.14-5-2.js
- * @description Object.keys - own enumerable accessor property of 'O' is defined in returned array
- */
-
-
-function testcase() {
- var obj = { };
-
- Object.defineProperty(obj, "prop", {
- get: function () {
- return 1003;
- },
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- return arr.hasOwnProperty(0) && arr[0] === "prop";
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - own enumerable accessor property of 'O' is defined + in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "prop", { + get: function () { + return 1003; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js index b04517d1b..8d638d32d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js @@ -1,39 +1,41 @@ -/// 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.14/15.2.3.14-5-3.js
- * @description Object.keys - non-enumerable own data property of 'O' is not defined in returned array
- */
-
-
-function testcase() {
- var obj = { prop1: 1001, prop2: 1002 };
-
- Object.defineProperty(obj, "prop3", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
-
- Object.defineProperty(obj, "prop4", {
- value: 1004,
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr.hasOwnProperty(p)) {
- if (arr[p] === "prop4") {
- return false;
- }
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - non-enumerable own data property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001, prop2: 1002 }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + value: 1004, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] === "prop4") { + return false; + } + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js index 6f343ed6a..8c41215c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js @@ -1,43 +1,45 @@ -/// 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.14/15.2.3.14-5-4.js
- * @description Object.keys - non-enumerable own accessor property of 'O' is not defined in returned array
- */
-
-
-function testcase() {
- var obj = {};
-
- Object.defineProperty(obj, "prop1", {
- get: function () { },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(obj, "prop2", {
- get: function () { },
- enumerable: false,
- configurable: true
- });
- Object.defineProperty(obj, "prop3", {
- get: function () { },
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr.hasOwnProperty(p)) {
- if (arr[p] === "prop2") {
- return false;
- }
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - non-enumerable own accessor property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop1", { + get: function () { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(obj, "prop2", { + get: function () { }, + enumerable: false, + configurable: true + }); + Object.defineProperty(obj, "prop3", { + get: function () { }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] === "prop2") { + return false; + } + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js index 1eca1c751..69080d431 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js @@ -1,35 +1,37 @@ -/// 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.14/15.2.3.14-5-5.js
- * @description Object.keys - inherited enumerable data property of 'O' is not defined in returned array
- */
-
-
-function testcase() {
- var proto = {};
- Object.defineProperty(proto, "inheritedProp", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
- var Con = function () { };
- Con.prototype = proto;
-
- var obj = new Con();
- obj.prop = 1004;
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "inheritedProp") {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - inherited enumerable data property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "inheritedProp", { + value: 1003, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + obj.prop = 1004; + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "inheritedProp") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js index 246248fd9..ff250bb1a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js @@ -1,43 +1,45 @@ -/// 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.14/15.2.3.14-5-6.js
- * @description Object.keys - inherited enumerable accessor property of 'O' is not defined in returned array
- */
-
-
-function testcase() {
- var proto = {};
- Object.defineProperty(proto, "inheritedProp", {
- get: function () {
- return 1003;
- },
- enumerable: true,
- configurable: true
- });
- var Con = function () { };
- Con.prototype = proto;
-
- var obj = new Con();
- Object.defineProperty(obj, "prop", {
- get: function () {
- return 1004;
- },
- enumerable: true,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "inheritedProp") {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - inherited enumerable accessor property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "inheritedProp", { + get: function () { + return 1003; + }, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { + return 1004; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "inheritedProp") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js index 09ccb04b1..b5f9ff524 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js @@ -1,39 +1,42 @@ -/// 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.14/15.2.3.14-5-7.js
- * @description Object.keys - inherted enumerable data property that is over-ridden by non-enumerable own data property is not defined in returned array
- */
-
-
-function testcase() {
- var proto = {};
- Object.defineProperty(proto, "prop", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
- var Con = function () { };
- Con.prototype = proto;
-
- var obj = new Con();
- Object.defineProperty(obj, "prop", {
- value: 1004,
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "prop") {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - inherted enumerable data property that is + over-ridden by non-enumerable own data property is not defined in + returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 1003, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + value: 1004, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js index 30fa15d77..252523865 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js @@ -1,39 +1,42 @@ -/// 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.14/15.2.3.14-5-8.js
- * @description Object.keys - inherted enumerable data property that is over-ridden by non-enumerable own accessor property is not defined in returned array
- */
-
-
-function testcase() {
- var proto = {};
- Object.defineProperty(proto, "prop", {
- value: 1003,
- enumerable: true,
- configurable: true
- });
- var Con = function () { };
- Con.prototype = proto;
-
- var obj = new Con();
- Object.defineProperty(obj, "prop", {
- get: function () { },
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "prop") {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - inherted enumerable data property that is + over-ridden by non-enumerable own accessor property is not defined + in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 1003, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js index 081de43cd..ed8d55a6e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js @@ -1,39 +1,42 @@ -/// 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.14/15.2.3.14-5-9.js
- * @description Object.keys - inherted enumerable accessor property that is over-ridden by non-enumerable own data property is not defined in returned array
- */
-
-
-function testcase() {
- var proto = {};
- Object.defineProperty(proto, "prop", {
- get: function () { },
- enumerable: true,
- configurable: true
- });
- var Con = function () { };
- Con.prototype = proto;
-
- var obj = new Con();
- Object.defineProperty(obj, "prop", {
- value: 1003,
- enumerable: false,
- configurable: true
- });
-
- var arr = Object.keys(obj);
-
- for (var p in arr) {
- if (arr[p] === "prop") {
- return false;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - inherted enumerable accessor property that is + over-ridden by non-enumerable own data property is not defined in + returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { }, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + value: 1003, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js index 139a9203b..a5219bd1b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js @@ -1,21 +1,23 @@ -/// 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.14/15.2.3.14-5-a-1.js
- * @description Object.keys - 'value' attribute of element in returned array is correct.
- */
-
-
-function testcase() {
- var obj = { prop1: 1 };
-
- var array = Object.keys(obj);
-
- var desc = Object.getOwnPropertyDescriptor(array, "0");
-
- return desc.hasOwnProperty("value") && desc.value === "prop1";
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - 'value' attribute of element in returned array is + correct. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1 }; + + var array = Object.keys(obj); + + var desc = Object.getOwnPropertyDescriptor(array, "0"); + + return desc.hasOwnProperty("value") && desc.value === "prop1"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js index 071b05f96..a0306e643 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js @@ -1,27 +1,29 @@ -/// 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.14/15.2.3.14-5-a-2.js
- * @description Object.keys - 'writable' attribute of element of returned array is correct
- */
-
-
-function testcase() {
- var obj = { prop1: 100 };
-
- var array = Object.keys(obj);
-
- try {
- array[0] = "isWritable";
-
- var desc = Object.getOwnPropertyDescriptor(array, "0");
-
- return array[0] === "isWritable" && desc.hasOwnProperty("writable") && desc.writable === true;
- } catch (e) {
- return false;
- }
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - 'writable' attribute of element of returned array is + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100 }; + + var array = Object.keys(obj); + + try { + array[0] = "isWritable"; + + var desc = Object.getOwnPropertyDescriptor(array, "0"); + + return array[0] === "isWritable" && desc.hasOwnProperty("writable") && desc.writable === true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js index 19ce2c050..7aaf0a469 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js @@ -1,26 +1,28 @@ -/// 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.14/15.2.3.14-5-a-3.js
- * @description Object.keys - 'enumerable' attribute of element of returned array is correct
- */
-
-
-function testcase() {
- var obj = { prop1: 100 };
-
- var array = Object.keys(obj);
- var desc = Object.getOwnPropertyDescriptor(array, "0");
- var result = false;
- for (var index in array) {
- if (obj.hasOwnProperty(array[index]) && array[index] === "prop1") {
- result = true;
- }
- }
-
- return result && desc.hasOwnProperty("enumerable") && desc.enumerable === true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - 'enumerable' attribute of element of returned array + is correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100 }; + + var array = Object.keys(obj); + var desc = Object.getOwnPropertyDescriptor(array, "0"); + var result = false; + for (var index in array) { + if (obj.hasOwnProperty(array[index]) && array[index] === "prop1") { + result = true; + } + } + + return result && desc.hasOwnProperty("enumerable") && desc.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js index 03d4fc152..9ac81fbcf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js @@ -1,22 +1,24 @@ -/// 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.14/15.2.3.14-5-a-4.js
- * @description Object.keys - Verify that 'configurable' attribute of element of returned array is correct
- */
-
-
-function testcase() {
- var obj = { prop1: 100 };
-
- var array = Object.keys(obj);
- var desc = Object.getOwnPropertyDescriptor(array, "0");
-
- delete array[0];
-
- return typeof array[0] === "undefined" && desc.hasOwnProperty("configurable") && desc.configurable === true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - Verify that 'configurable' attribute of element of + returned array is correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100 }; + + var array = Object.keys(obj); + var desc = Object.getOwnPropertyDescriptor(array, "0"); + + delete array[0]; + + return typeof array[0] === "undefined" && desc.hasOwnProperty("configurable") && desc.configurable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js index 44815b55c..ad1e6b14c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js @@ -1,29 +1,29 @@ -/// 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.14/15.2.3.14-5-b-1.js
- * @description Object.keys - Verify that 'index' of returned array is ascend by 1
- */
-
-
-function testcase() {
- var obj = { prop1: 100, prop2: 200, prop3: 300 };
-
- var array = Object.keys(obj);
-
- var idx = 0;
- for (var index in array) {
- if (array.hasOwnProperty(index)) {
- if (index !== idx.toString()) {
- return false;
- }
- idx++;
- }
- }
-
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: Object.keys - Verify that 'index' of returned array is ascend by 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100, prop2: 200, prop3: 300 }; + + var array = Object.keys(obj); + + var idx = 0; + for (var index in array) { + if (array.hasOwnProperty(index)) { + if (index !== idx.toString()) { + return false; + } + idx++; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js index 75c37fc01..34694f0a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js @@ -1,32 +1,34 @@ -/// 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.14/15.2.3.14-6-1.js
- * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (dense array)
- */
-
-
-function testcase() {
- var denseArray = [1, 2, 3];
-
- var tempArray = [];
- for (var p in denseArray) {
- if (denseArray.hasOwnProperty(p)) {
- tempArray.push(p);
- }
- }
-
- var returnedArray = Object.keys(denseArray);
-
- for (var index in returnedArray) {
- if (tempArray[index] !== returnedArray[index]) {
- return false;
- }
- }
- return true;
-
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (dense array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var denseArray = [1, 2, 3]; + + var tempArray = []; + for (var p in denseArray) { + if (denseArray.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(denseArray); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js index 677f978a2..a0f5ef75b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js @@ -1,31 +1,33 @@ -/// 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.14/15.2.3.14-6-2.js
- * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (sparse array)
- */
-
-
-function testcase() {
- var sparseArray = [1, 2, , 4, , 6];
-
- var tempArray = [];
- for (var p in sparseArray) {
- if (sparseArray.hasOwnProperty(p)) {
- tempArray.push(p);
- }
- }
-
- var returnedArray = Object.keys(sparseArray);
-
- for (var index in returnedArray) {
- if (tempArray[index] !== returnedArray[index]) {
- return false;
- }
- }
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (sparse array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var sparseArray = [1, 2, , 4, , 6]; + + var tempArray = []; + for (var p in sparseArray) { + if (sparseArray.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(sparseArray); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js index 6fd0b455f..069626c25 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js @@ -1,31 +1,33 @@ -/// 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.14/15.2.3.14-6-3.js
- * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (String object)
- */
-
-
-function testcase() {
- var str = new String("abc");
-
- var tempArray = [];
- for (var p in str) {
- if (str.hasOwnProperty(p)) {
- tempArray.push(p);
- }
- }
-
- var returnedArray = Object.keys(str);
-
- for (var index in returnedArray) {
- if (tempArray[index] !== returnedArray[index]) {
- return false;
- }
- }
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (String object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = new String("abc"); + + var tempArray = []; + for (var p in str) { + if (str.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(str); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js index a3bb0aee0..182d36c36 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js @@ -1,35 +1,37 @@ -/// 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.14/15.2.3.14-6-4.js
- * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (Arguments object)
- */
-
-
-function testcase() {
- var func = function (a, b, c) {
- return arguments;
- };
-
- var args = func(1, "b", false);
-
- var tempArray = [];
- for (var p in args) {
- if (args.hasOwnProperty(p)) {
- tempArray.push(p);
- }
- }
-
- var returnedArray = Object.keys(args);
-
- for (var index in returnedArray) {
- if (tempArray[index] !== returnedArray[index]) {
- return false;
- }
- }
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (Arguments object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (a, b, c) { + return arguments; + }; + + var args = func(1, "b", false); + + var tempArray = []; + for (var p in args) { + if (args.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(args); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js index a6b455187..c977fd8c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js @@ -1,33 +1,35 @@ -/// 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.14/15.2.3.14-6-5.js
- * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (any other built-in object)
- */
-
-
-function testcase() {
- var obj = new Date();
- obj.prop1 = 100;
- obj.prop2 = "prop2";
-
- var tempArray = [];
- for (var p in obj) {
- if (obj.hasOwnProperty(p)) {
- tempArray.push(p);
- }
- }
-
- var returnedArray = Object.keys(obj);
-
- for (var index in returnedArray) {
- if (tempArray[index] !== returnedArray[index]) {
- return false;
- }
- }
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (any other built-in object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Date(); + obj.prop1 = 100; + obj.prop2 = "prop2"; + + var tempArray = []; + for (var p in obj) { + if (obj.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(obj); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js index e292e0274..e8dbfae63 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js @@ -1,31 +1,35 @@ -/// 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.14/15.2.3.14-6-6.js
- * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (global Object)
- */
-
-
-function testcase() {
- var obj = fnGlobalObject();
-
- var tempArray = [];
- for (var p in obj) {
- if (obj.hasOwnProperty(p)) {
- tempArray.push(p);
- }
- }
-
- var returnedArray = Object.keys(obj);
-
- for (var index in returnedArray) {
- if (tempArray[index] !== returnedArray[index]) {
- return false;
- }
- }
- return true;
- }
-runTestCase(testcase);
+// 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. + +/*--- +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (global Object) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + + var tempArray = []; + for (var p in obj) { + if (obj.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(obj); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); |