diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor')
312 files changed, 6065 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-0-1.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-0-1.js new file mode 100644 index 0000000000..6091f471a4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-0-1.js @@ -0,0 +1,11 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-0-1 +description: Object.getOwnPropertyDescriptor must exist as a function +---*/ + +assert.sameValue(typeof(Object.getOwnPropertyDescriptor), "function", 'typeof(Object.getOwnPropertyDescriptor)'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-1.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-1.js new file mode 100644 index 0000000000..1fe7292fba --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-1.js @@ -0,0 +1,16 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-1-1 +description: > + Object.getOwnPropertyDescriptor - TypeError is thrown when first + param is undefined +---*/ + + +assert.throws(TypeError, function() { + Object.getOwnPropertyDescriptor(undefined, "foo"); +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-2.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-2.js new file mode 100644 index 0000000000..49c5986967 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-2.js @@ -0,0 +1,16 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-1-2 +description: > + Object.getOwnPropertyDescriptor - TypeError is thrown when first + param is null +---*/ + + +assert.throws(TypeError, function() { + Object.getOwnPropertyDescriptor(null, "foo"); +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-3.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-3.js new file mode 100644 index 0000000000..9c1a71ea16 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-3.js @@ -0,0 +1,13 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-1-3 +description: > + Object.getOwnPropertyDescriptor - TypeError is not thrown when + first param is a boolean +---*/ + +Object.getOwnPropertyDescriptor(true, "foo"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-4.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-4.js new file mode 100644 index 0000000000..ce1207add0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1-4.js @@ -0,0 +1,13 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-1-4 +description: > + Object.getOwnPropertyDescriptor - TypeError is not thrown when + first param is a number +---*/ + +Object.getOwnPropertyDescriptor(-2, "foo"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1.js new file mode 100644 index 0000000000..edbc28c1f2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-1.js @@ -0,0 +1,13 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-1 +description: > + Object.getOwnPropertyDescriptor does not throw TypeError if type + of first param is not Object +---*/ + +Object.getOwnPropertyDescriptor(0, "foo"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-1.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-1.js new file mode 100644 index 0000000000..4d376c7b0e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-1.js @@ -0,0 +1,16 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-1 +description: > + Object.getOwnPropertyDescriptor returns undefined for undefined + property name +---*/ + +var o = {}; +var desc = Object.getOwnPropertyDescriptor(o, undefined); + +assert.sameValue(desc, undefined, 'desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-10.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-10.js new file mode 100644 index 0000000000..81440d3ab9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-10.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-10 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is -0) +---*/ + +var obj = { + "0": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, -0); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-11.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-11.js new file mode 100644 index 0000000000..4f10fab55c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-11.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-11 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is positive number) +---*/ + +var obj = { + "30": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 30); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-12.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-12.js new file mode 100644 index 0000000000..196c480ebf --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-12.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-12 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is negative number) +---*/ + +var obj = { + "-20": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, -20); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-13.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-13.js new file mode 100644 index 0000000000..0756f566f7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-13.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-13 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is Infinity) +---*/ + +var obj = { + "Infinity": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, Infinity); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-14.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-14.js new file mode 100644 index 0000000000..2cc0fe0c40 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-14.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-14 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is +Infinity) +---*/ + +var obj = { + "Infinity": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, +Infinity); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-15.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-15.js new file mode 100644 index 0000000000..b343454f39 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-15.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-15 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is -Infinity) +---*/ + +var obj = { + "-Infinity": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, -Infinity); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-16.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-16.js new file mode 100644 index 0000000000..0b0bc12125 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-16.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-16 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1(following 20 zeros)) +---*/ + +var obj = { + "100000000000000000000": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-17.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-17.js new file mode 100644 index 0000000000..5836df517e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-17.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-17 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1(following 21 zeros)) +---*/ + +var obj = { + "1e+21": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1000000000000000000000); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-18.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-18.js new file mode 100644 index 0000000000..b469d21f6e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-18.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-18 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1(following 22 zeros)) +---*/ + +var obj = { + "1e+22": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 10000000000000000000000); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-19.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-19.js new file mode 100644 index 0000000000..6a8b57697f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-19.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-19 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e+20) +---*/ + +var obj = { + "100000000000000000000": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1e+20); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-2.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-2.js new file mode 100644 index 0000000000..5d9be7493f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-2.js @@ -0,0 +1,16 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-2 +description: > + Object.getOwnPropertyDescriptor returns undefined for null + property name +---*/ + +var o = {}; +var desc = Object.getOwnPropertyDescriptor(o, null); + +assert.sameValue(desc, undefined, 'desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-20.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-20.js new file mode 100644 index 0000000000..ae1c23563e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-20.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-20 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to string (value is 1e+21) +---*/ + +var obj = { + "1e+21": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1e+21); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-21.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-21.js new file mode 100644 index 0000000000..74c02b3ec3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-21.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-21 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e+22) +---*/ + +var obj = { + "1e+22": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1e+22); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-22.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-22.js new file mode 100644 index 0000000000..a2c3f604e5 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-22.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-22 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0.000001) +---*/ + +var obj = { + "0.000001": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 0.000001); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-23.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-23.js new file mode 100644 index 0000000000..5abd621976 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-23.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-23 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0.0000001) +---*/ + +var obj = { + "1e-7": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 0.0000001); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-24.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-24.js new file mode 100644 index 0000000000..aa61ce49de --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-24.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-24 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0.00000001) +---*/ + +var obj = { + "1e-8": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 0.00000001); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-25.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-25.js new file mode 100644 index 0000000000..c0f72251f0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-25.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-25 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e-7) +---*/ + +var obj = { + "1e-7": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1e-7); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-26.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-26.js new file mode 100644 index 0000000000..eee9c091a5 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-26.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-26 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e-6) +---*/ + +var obj = { + "0.000001": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1e-6); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-27.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-27.js new file mode 100644 index 0000000000..f6da9abf3b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-27.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-27 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e-5) +---*/ + +var obj = { + "0.00001": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1e-5); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-28.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-28.js new file mode 100644 index 0000000000..97861576ce --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-28.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-28 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an integer that + converts to a string (value is 123) +---*/ + +var obj = { + "123": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 123); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-29.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-29.js new file mode 100644 index 0000000000..9202529dac --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-29.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-29 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a decimal that + converts to a string (value is 123.456) +---*/ + +var obj = { + "123.456": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 123.456); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-3.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-3.js new file mode 100644 index 0000000000..f7c513f5c1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-3.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-3 +description: Object.getOwnPropertyDescriptor - argument 'P' is undefined +---*/ + +var obj = { + "undefined": 1 +}; + +var desc1 = Object.getOwnPropertyDescriptor(obj, undefined); +var desc2 = Object.getOwnPropertyDescriptor(obj, "undefined"); + +assert.sameValue(desc1.value, 1, 'desc1.value'); +assert.sameValue(desc2.value, 1, 'desc2.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-30.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-30.js new file mode 100644 index 0000000000..571529c5ff --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-30.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-30 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 100000000000000000000.123) +---*/ + +var obj = { + "100000000000000000000": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000.123); + +assert(typeof desc !== "undefined", 'typeof desc !== "undefined" !== true'); +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-31.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-31.js new file mode 100644 index 0000000000..fea8aa1bff --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-31.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-31 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 123.1234567) +---*/ + +var obj = { + "123.1234567": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 123.1234567); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-32.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-32.js new file mode 100644 index 0000000000..dd4bb41db1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-32.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-32 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to an + empty string +---*/ + +var obj = { + "": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, ""); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-33.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-33.js new file mode 100644 index 0000000000..2a943b3cc0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-33.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-33 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string 'AB \cd' +---*/ + +var obj = { + "AB\n\\cd": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "AB\n\\cd"); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-34.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-34.js new file mode 100644 index 0000000000..d57672e12a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-34.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-34 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string 'undefined' +---*/ + +var obj = { + "undefined": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "undefined"); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-35.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-35.js new file mode 100644 index 0000000000..40be1fa769 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-35.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-35 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string 'null' +---*/ + +var obj = { + "null": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "null"); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-36.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-36.js new file mode 100644 index 0000000000..490b8afeef --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-36.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-36 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string '123���¦�cd' +---*/ + +var obj = { + "123���¦�cd": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "123���¦�cd"); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-37.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-37.js new file mode 100644 index 0000000000..83525bfc98 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-37.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-37 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string '1' +---*/ + +var obj = { + "1": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 1); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-38.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-38.js new file mode 100644 index 0000000000..88ff048cfe --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-38.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-38 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an array that + converts to a string +---*/ + +var obj = { + "1": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, [1]); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-39.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-39.js new file mode 100644 index 0000000000..431183133e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-39.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-39 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a String Object + that converts to a string +---*/ + +var obj = { + "Hello": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, new String("Hello")); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-4.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-4.js new file mode 100644 index 0000000000..dc74899485 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-4.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-4 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is null that + converts to string 'null' +---*/ + +var obj = { + "null": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, null); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-40.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-40.js new file mode 100644 index 0000000000..81f25c487b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-40.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-40 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a Boolean Object + that converts to a string +---*/ + +var obj = { + "true": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, new Boolean(true)); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-41.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-41.js new file mode 100644 index 0000000000..76e27bca11 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-41.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-41 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a Number Object + that converts to a string +---*/ + +var obj = { + "123": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, new Number(123)); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-42.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-42.js new file mode 100644 index 0000000000..5f1503f0e9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-42.js @@ -0,0 +1,25 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-42 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object which + has an own toString method +---*/ + +var obj = { + "abc": 1 +}; + +var ownProp = { + toString: function() { + return "abc"; + } +}; + +var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-43.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-43.js new file mode 100644 index 0000000000..1ae725bc0f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-43.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-43 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object which + has an own valueOf method +---*/ + +var obj = { + "[object Object]": 1, + "abc": 2 +}; + +var ownProp = { + valueOf: function() { + return "abc"; + } +}; + +var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-44.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-44.js new file mode 100644 index 0000000000..5d4ce6f369 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-44.js @@ -0,0 +1,35 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-44 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object that + has an own toString method that returns an object and toValue + method that returns a primitive value +---*/ + +var obj = { + "abc": 1 +}; +var valueOfAccessed = false; +var toStringAccessed = false; + +var ownProp = { + toString: function() { + toStringAccessed = true; + return {}; + }, + valueOf: function() { + valueOfAccessed = true; + return "abc"; + } +}; + +var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + +assert.sameValue(desc.value, 1, 'desc.value'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-45.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-45.js new file mode 100644 index 0000000000..cb7c995a5a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-45.js @@ -0,0 +1,32 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-45 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object which + has an own toString and valueOf method +---*/ + +var obj = { + "bbq": 1, + "abc": 2 +}; +var valueOfAccessed = false; + +var ownProp = { + toString: function() { + return "bbq"; + }, + valueOf: function() { + valueOfAccessed = true; + return "abc"; + } +}; + +var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + +assert.sameValue(desc.value, 1, 'desc.value'); +assert.sameValue(valueOfAccessed, false, 'valueOfAccessed'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-46.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-46.js new file mode 100644 index 0000000000..2e587155d7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-46.js @@ -0,0 +1,34 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-46 +description: > + Object.getOwnPropertyDescriptor - TypeError exception was thrown + when 'P' is an object that both toString and valueOf wouldn't + return primitive value +---*/ + +var obj = { + "1": 1 +}; +var toStringAccessed = false; +var valueOfAccessed = false; + +var ownProp = { + toString: function() { + toStringAccessed = true; + return [1]; + }, + valueOf: function() { + valueOfAccessed = true; + return [1]; + } +}; +assert.throws(TypeError, function() { + Object.getOwnPropertyDescriptor(obj, ownProp); +}); +assert(toStringAccessed, 'toStringAccessed !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-47.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-47.js new file mode 100644 index 0000000000..65ecda5c36 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-47.js @@ -0,0 +1,39 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-47 +description: > + Object.getOwnPropertyDescriptor - uses inherited toString method + when 'P' is an object with an own valueOf and inherited toString + methods +---*/ + +var proto = {}; +var valueOfAccessed = false; +var toStringAccessed = false; + +proto.toString = function() { + toStringAccessed = true; + return "test"; +}; + +var Con = function() {}; +Con.prototype = proto; + +var child = new Con(); +child.valueOf = function() { + valueOfAccessed = true; + return "10"; +}; +var obj = { + "10": "length1", + "test": "length2" +}; +var desc = Object.getOwnPropertyDescriptor(obj, child); + +assert.sameValue(desc.value, "length2", 'desc.value'); +assert(toStringAccessed, 'toStringAccessed !== true'); +assert.sameValue(valueOfAccessed, false, 'valueOfAccessed'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-5.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-5.js new file mode 100644 index 0000000000..c77b4d2ee5 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-5.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-5 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose + value is false +---*/ + +var obj = { + "false": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, false); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-6.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-6.js new file mode 100644 index 0000000000..c38d44d18b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-6.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-6 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose + value is true +---*/ + +var obj = { + "true": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, true); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-7.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-7.js new file mode 100644 index 0000000000..36e7fb876c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-7.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-7 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is NaN) +---*/ + +var obj = { + "NaN": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, NaN); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-8.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-8.js new file mode 100644 index 0000000000..539ba7663f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-8.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-8 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0) +---*/ + +var obj = { + "0": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, 0); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-9.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-9.js new file mode 100644 index 0000000000..fd11e10ef8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-2-9.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-2-9 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is +0) +---*/ + +var obj = { + "0": 1 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, +0); + +assert.sameValue(desc.value, 1, 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-1.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-1.js new file mode 100644 index 0000000000..385747f7c0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-1.js @@ -0,0 +1,17 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-1 +description: Object.getOwnPropertyDescriptor - 'P' is own data property +---*/ + +var obj = { + property: "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.value, "ownDataProperty", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-10.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-10.js new file mode 100644 index 0000000000..43b8b47d6c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-10.js @@ -0,0 +1,17 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-10 +description: Object.getOwnPropertyDescriptor - 'P' is not an existing property +---*/ + +var obj = { + property: "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "propertyNonExist"); + +assert.sameValue(typeof desc, "undefined", 'typeof desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-13.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-13.js new file mode 100644 index 0000000000..40ceee22bf --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-13.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-13 +description: > + Object.getOwnPropertyDescriptor applied to the Arguments object + which implements its own property get method +---*/ + +var arg = (function() { + return arguments; +}("ownProperty", true)); + +var desc = Object.getOwnPropertyDescriptor(arg, "0"); + +assert.sameValue(desc.value, "ownProperty", 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, true, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js new file mode 100644 index 0000000000..0a61a13e32 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-14.js @@ -0,0 +1,17 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-14 +description: > + Object.getOwnPropertyDescriptor applied to a String object which + implements its own property get method +---*/ + +var str = new String("123"); + +var desc = Object.getOwnPropertyDescriptor(str, "2"); + +assert.sameValue(desc.value, "3", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-15.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-15.js new file mode 100644 index 0000000000..468d4ba89b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-15.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-15 +description: > + Object.getOwnPropertyDescriptor applied to a Function object which + implements its own property get method +---*/ + +var obj = function(a, b) { + return a + b; +}; +obj[1] = "ownProperty"; + +var desc = Object.getOwnPropertyDescriptor(obj, "1"); + +assert.sameValue(desc.value, "ownProperty", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-2.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-2.js new file mode 100644 index 0000000000..ea142dbd38 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-2.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-2 +description: Object.getOwnPropertyDescriptor - 'P' is inherited data property +---*/ + +var proto = { + property: "inheritedDataProperty" +}; + +var Con = function() {}; +Con.ptototype = proto; + +var child = new Con(); + +var desc = Object.getOwnPropertyDescriptor(child, "property"); + +assert.sameValue(typeof desc, "undefined", 'typeof desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-3.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-3.js new file mode 100644 index 0000000000..c45d530e17 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-3.js @@ -0,0 +1,25 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-3 +description: > + Object.getOwnPropertyDescriptor - 'P' is own data property that + overrides an inherited data property +---*/ + +var proto = { + property: "inheritedDataProperty" +}; + +var Con = function() {}; +Con.ptototype = proto; + +var child = new Con(); +child.property = "ownDataProperty"; + +var desc = Object.getOwnPropertyDescriptor(child, "property"); + +assert.sameValue(desc.value, "ownDataProperty", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-4.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-4.js new file mode 100644 index 0000000000..8edd7ff28b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-4.js @@ -0,0 +1,32 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-4 +description: > + Object.getOwnPropertyDescriptor - 'P' is own data property that + overrides an inherited accessor property +---*/ + +var proto = {}; +Object.defineProperty(proto, "property", { + get: function() { + return "inheritedDataProperty"; + }, + configurable: true +}); + +var Con = function() {}; +Con.ptototype = proto; + +var child = new Con(); +Object.defineProperty(child, "property", { + value: "ownDataProperty", + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(child, "property"); + +assert.sameValue(desc.value, "ownDataProperty", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-5.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-5.js new file mode 100644 index 0000000000..3fcadce9c4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-5.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-5 +description: Object.getOwnPropertyDescriptor - 'P' is own accessor property +---*/ + +var obj = {}; +var fun = function() { + return "ownAccessorProperty"; +}; +Object.defineProperty(obj, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.get, fun, 'desc.get'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-6.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-6.js new file mode 100644 index 0000000000..de4edf499c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-6.js @@ -0,0 +1,29 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-6 +description: > + Object.getOwnPropertyDescriptor - 'P' is inherited accessor + property +---*/ + +var proto = {}; +var fun = function() { + return "ownAccessorProperty"; +}; +Object.defineProperty(proto, "property", { + get: fun, + configurable: true +}); + +var Con = function() {}; +Con.prototype = proto; + +var child = new Con(); + +var desc = Object.getOwnPropertyDescriptor(child, "property"); + +assert.sameValue(typeof desc, "undefined", 'typeof desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-7.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-7.js new file mode 100644 index 0000000000..6836cad0dc --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-7.js @@ -0,0 +1,31 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-7 +description: > + Object.getOwnPropertyDescriptor - 'P' is own accessor property + that overrides an inherited data property +---*/ + +var proto = { + property: "inheritedDataProperty" +}; + +var Con = function() {}; +Con.ptototype = proto; + +var child = new Con(); +var fun = function() { + return "ownAccessorProperty"; +}; +Object.defineProperty(child, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(child, "property"); + +assert.sameValue(desc.get, fun, 'desc.get'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-8.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-8.js new file mode 100644 index 0000000000..c6951d4809 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-8.js @@ -0,0 +1,35 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-8 +description: > + Object.getOwnPropertyDescriptor - 'P' is own accessor property + that overrides an inherited accessor property +---*/ + +var proto = {}; +Object.defineProperty(proto, "property", { + get: function() { + return "inheritedAccessorProperty"; + }, + configurable: true +}); + +var Con = function() {}; +Con.ptototype = proto; + +var child = new Con(); +var fun = function() { + return "ownAccessorProperty"; +}; +Object.defineProperty(child, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(child, "property"); + +assert.sameValue(desc.get, fun, 'desc.get'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-9.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-9.js new file mode 100644 index 0000000000..b3680f148d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-3-9.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-3-9 +description: > + Object.getOwnPropertyDescriptor - 'P' is own accessor property + without a get function +---*/ + +var obj = {}; +var fun = function() {}; +Object.defineProperty(obj, "property", { + set: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.set, fun, 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-1.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-1.js new file mode 100644 index 0000000000..5f21de35e7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-1.js @@ -0,0 +1,23 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-1 +description: > + Object.getOwnPropertyDescriptor returns an object representing a + data desc for valid data valued properties +---*/ + +var o = {}; +o["foo"] = 101; + +var desc = Object.getOwnPropertyDescriptor(o, "foo"); + +assert.sameValue(desc.value, 101, 'desc.value'); +assert.sameValue(desc.enumerable, true, 'desc.enumerable'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty("get"), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty("set"), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js new file mode 100644 index 0000000000..8439d72ef8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-10 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.decodeURIComponent) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "decodeURIComponent"); + +assert.sameValue(desc.value, global.decodeURIComponent, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-100.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-100.js new file mode 100644 index 0000000000..e9c359d5d1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-100.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-100 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.atan2) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "atan2"); + +assert.sameValue(desc.value, Math.atan2, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-101.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-101.js new file mode 100644 index 0000000000..dc8a1d939c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-101.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-101 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.ceil) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "ceil"); + +assert.sameValue(desc.value, Math.ceil, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-102.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-102.js new file mode 100644 index 0000000000..c0d7aca3bf --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-102.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-102 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.cos) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "cos"); + +assert.sameValue(desc.value, Math.cos, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-103.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-103.js new file mode 100644 index 0000000000..384f0f8eb0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-103.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-103 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.exp) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "exp"); + +assert.sameValue(desc.value, Math.exp, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-104.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-104.js new file mode 100644 index 0000000000..c256ec6070 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-104.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-104 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.floor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "floor"); + +assert.sameValue(desc.value, Math.floor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-105.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-105.js new file mode 100644 index 0000000000..47c1896ac3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-105.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-105 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.log) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "log"); + +assert.sameValue(desc.value, Math.log, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-106.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-106.js new file mode 100644 index 0000000000..17bad02229 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-106.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-106 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.max) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "max"); + +assert.sameValue(desc.value, Math.max, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-107.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-107.js new file mode 100644 index 0000000000..7a305faba3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-107.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-107 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.min) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "min"); + +assert.sameValue(desc.value, Math.min, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-108.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-108.js new file mode 100644 index 0000000000..90049e3f74 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-108.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-108 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.pow) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "pow"); + +assert.sameValue(desc.value, Math.pow, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-109.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-109.js new file mode 100644 index 0000000000..adf204a422 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-109.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-109 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.random) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "random"); + +assert.sameValue(desc.value, Math.random, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js new file mode 100644 index 0000000000..ceb49ccceb --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-11 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.encodeURIComponent) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "encodeURIComponent"); + +assert.sameValue(desc.value, global.encodeURIComponent, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-110.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-110.js new file mode 100644 index 0000000000..444913e562 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-110.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-110 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.round) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "round"); + +assert.sameValue(desc.value, Math.round, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-111.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-111.js new file mode 100644 index 0000000000..66d9956e4a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-111.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-111 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.sin) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "sin"); + +assert.sameValue(desc.value, Math.sin, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-112.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-112.js new file mode 100644 index 0000000000..dc60ff68e1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-112.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-112 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.sqrt) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "sqrt"); + +assert.sameValue(desc.value, Math.sqrt, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-113.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-113.js new file mode 100644 index 0000000000..30d96025b2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-113.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-113 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.tan) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "tan"); + +assert.sameValue(desc.value, Math.tan, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-114.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-114.js new file mode 100644 index 0000000000..5b79aed297 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-114.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-114 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.parse) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date, "parse"); + +assert.sameValue(desc.value, Date.parse, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-115.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-115.js new file mode 100644 index 0000000000..4f7fdd1122 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-115.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-115 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.UTC) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date, "UTC"); + +assert.sameValue(desc.value, Date.UTC, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-116.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-116.js new file mode 100644 index 0000000000..73296e71ef --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-116.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-116 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "constructor"); + +assert.sameValue(desc.value, Date.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-117.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-117.js new file mode 100644 index 0000000000..5656ddf03e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-117.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-117 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getTime) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTime"); + +assert.sameValue(desc.value, Date.prototype.getTime, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-118.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-118.js new file mode 100644 index 0000000000..3fac9bdf0b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-118.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-118 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getTimezoneOffset) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTimezoneOffset"); + +assert.sameValue(desc.value, Date.prototype.getTimezoneOffset, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-120.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-120.js new file mode 100644 index 0000000000..1fa31bca5e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-120.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-120 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getFullYear) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getFullYear"); + +assert.sameValue(desc.value, Date.prototype.getFullYear, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-121.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-121.js new file mode 100644 index 0000000000..ae3aa23335 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-121.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-121 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getMonth) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMonth"); + +assert.sameValue(desc.value, Date.prototype.getMonth, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-122.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-122.js new file mode 100644 index 0000000000..cad2e05a1a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-122.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-122 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getDate) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDate"); + +assert.sameValue(desc.value, Date.prototype.getDate, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-123.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-123.js new file mode 100644 index 0000000000..bd6d6ee2d6 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-123.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-123 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getDay) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDay"); + +assert.sameValue(desc.value, Date.prototype.getDay, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-124.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-124.js new file mode 100644 index 0000000000..8f0f754d76 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-124.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-124 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getHours) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getHours"); + +assert.sameValue(desc.value, Date.prototype.getHours, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-125.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-125.js new file mode 100644 index 0000000000..2c70b28424 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-125.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-125 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getMinutes) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMinutes"); + +assert.sameValue(desc.value, Date.prototype.getMinutes, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-126.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-126.js new file mode 100644 index 0000000000..e87c8c0c0e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-126.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-126 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getSeconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getSeconds"); + +assert.sameValue(desc.value, Date.prototype.getSeconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-127.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-127.js new file mode 100644 index 0000000000..3a7c5be874 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-127.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-127 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getMilliseconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMilliseconds"); + +assert.sameValue(desc.value, Date.prototype.getMilliseconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-128.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-128.js new file mode 100644 index 0000000000..3a418f79ff --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-128.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-128 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCFullYear) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCFullYear"); + +assert.sameValue(desc.value, Date.prototype.getUTCFullYear, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-129.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-129.js new file mode 100644 index 0000000000..0890ec0fba --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-129.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-129 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCMonth) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMonth"); + +assert.sameValue(desc.value, Date.prototype.getUTCMonth, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-130.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-130.js new file mode 100644 index 0000000000..7f84067ea8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-130.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-130 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCDate) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDate"); + +assert.sameValue(desc.value, Date.prototype.getUTCDate, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-131.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-131.js new file mode 100644 index 0000000000..556ffa437c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-131.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-131 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCDay) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDay"); + +assert.sameValue(desc.value, Date.prototype.getUTCDay, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-132.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-132.js new file mode 100644 index 0000000000..b406bfeb42 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-132.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-132 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCHours) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCHours"); + +assert.sameValue(desc.value, Date.prototype.getUTCHours, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-133.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-133.js new file mode 100644 index 0000000000..c35dac5d6e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-133.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-133 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCMinutes) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMinutes"); + +assert.sameValue(desc.value, Date.prototype.getUTCMinutes, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-134.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-134.js new file mode 100644 index 0000000000..f14314b739 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-134.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-134 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCSeconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCSeconds"); + +assert.sameValue(desc.value, Date.prototype.getUTCSeconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-135.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-135.js new file mode 100644 index 0000000000..475a3a661d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-135.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-135 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCMilliseconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMilliseconds"); + +assert.sameValue(desc.value, Date.prototype.getUTCMilliseconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-136.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-136.js new file mode 100644 index 0000000000..8fc7bd5e6a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-136.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-136 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setTime) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setTime"); + +assert.sameValue(desc.value, Date.prototype.setTime, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-138.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-138.js new file mode 100644 index 0000000000..462da4ce31 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-138.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-138 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setFullYear) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setFullYear"); + +assert.sameValue(desc.value, Date.prototype.setFullYear, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-139.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-139.js new file mode 100644 index 0000000000..f8db714857 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-139.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-139 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setMonth) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMonth"); + +assert.sameValue(desc.value, Date.prototype.setMonth, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-14.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-14.js new file mode 100644 index 0000000000..51b97ffdcf --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-14.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-14 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.getPrototypeOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf"); + +assert.sameValue(desc.value, Object.getPrototypeOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-140.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-140.js new file mode 100644 index 0000000000..7bb449b89b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-140.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-140 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setDate) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setDate"); + +assert.sameValue(desc.value, Date.prototype.setDate, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-141.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-141.js new file mode 100644 index 0000000000..1af8ee104a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-141.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-141 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setHours) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setHours"); + +assert.sameValue(desc.value, Date.prototype.setHours, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-142.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-142.js new file mode 100644 index 0000000000..b389c484e0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-142.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-142 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setMinutes) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMinutes"); + +assert.sameValue(desc.value, Date.prototype.setMinutes, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-143.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-143.js new file mode 100644 index 0000000000..7fe0b638d7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-143.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-143 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setSeconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setSeconds"); + +assert.sameValue(desc.value, Date.prototype.setSeconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-144.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-144.js new file mode 100644 index 0000000000..88535c90b4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-144.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-144 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setMilliseconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMilliseconds"); + +assert.sameValue(desc.value, Date.prototype.setMilliseconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-145.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-145.js new file mode 100644 index 0000000000..824a344fe7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-145.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-145 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCFullYear) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCFullYear"); + +assert.sameValue(desc.value, Date.prototype.setUTCFullYear, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-146.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-146.js new file mode 100644 index 0000000000..8465599caa --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-146.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-146 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCMonth) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMonth"); + +assert.sameValue(desc.value, Date.prototype.setUTCMonth, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-147.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-147.js new file mode 100644 index 0000000000..fadf6b695d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-147.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-147 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCDate) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCDate"); + +assert.sameValue(desc.value, Date.prototype.setUTCDate, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-148.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-148.js new file mode 100644 index 0000000000..3b8b135407 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-148.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-148 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCHours) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCHours"); + +assert.sameValue(desc.value, Date.prototype.setUTCHours, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-149.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-149.js new file mode 100644 index 0000000000..8e533ddcfc --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-149.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-149 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCMinutes) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMinutes"); + +assert.sameValue(desc.value, Date.prototype.setUTCMinutes, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-15.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-15.js new file mode 100644 index 0000000000..c3f42af5c6 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-15.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-15 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.getOwnPropertyDescriptor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor"); + +assert.sameValue(desc.value, Object.getOwnPropertyDescriptor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-150.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-150.js new file mode 100644 index 0000000000..d6b5b1b16c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-150.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-150 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCSeconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCSeconds"); + +assert.sameValue(desc.value, Date.prototype.setUTCSeconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-151.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-151.js new file mode 100644 index 0000000000..b7df94de1e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-151.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-151 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCMilliseconds) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMilliseconds"); + +assert.sameValue(desc.value, Date.prototype.setUTCMilliseconds, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-152.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-152.js new file mode 100644 index 0000000000..449868c46c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-152.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-152 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toLocaleString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleString"); + +assert.sameValue(desc.value, Date.prototype.toLocaleString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-153.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-153.js new file mode 100644 index 0000000000..6099cf51c8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-153.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-153 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toString"); + +assert.sameValue(desc.value, Date.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-154.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-154.js new file mode 100644 index 0000000000..e2d54ce6ae --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-154.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-154 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toUTCString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toUTCString"); + +assert.sameValue(desc.value, Date.prototype.toUTCString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-156.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-156.js new file mode 100644 index 0000000000..65c2f65295 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-156.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-156 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toTimeString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toTimeString"); + +assert.sameValue(desc.value, Date.prototype.toTimeString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-157.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-157.js new file mode 100644 index 0000000000..5d5162937b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-157.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-157 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toDateString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toDateString"); + +assert.sameValue(desc.value, Date.prototype.toDateString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-158.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-158.js new file mode 100644 index 0000000000..f11af2a897 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-158.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-158 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toLocaleDateString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleDateString"); + +assert.sameValue(desc.value, Date.prototype.toLocaleDateString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-159.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-159.js new file mode 100644 index 0000000000..c136a866d1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-159.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-159 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toLocaleTimeString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleTimeString"); + +assert.sameValue(desc.value, Date.prototype.toLocaleTimeString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-16.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-16.js new file mode 100644 index 0000000000..fa5e3c0c71 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-16.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-16 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.getOwnPropertyNames) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames"); + +assert.sameValue(desc.value, Object.getOwnPropertyNames, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-160.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-160.js new file mode 100644 index 0000000000..8d7d787884 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-160.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-160 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.valueOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "valueOf"); + +assert.sameValue(desc.value, Date.prototype.valueOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-161.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-161.js new file mode 100644 index 0000000000..d56afdb5d3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-161.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-161 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toISOString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString"); + +assert.sameValue(desc.value, Date.prototype.toISOString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-162.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-162.js new file mode 100644 index 0000000000..cba39e7d76 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-162.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-162 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toJSON) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON"); + +assert.sameValue(desc.value, Date.prototype.toJSON, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-163.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-163.js new file mode 100644 index 0000000000..4dee6e6084 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-163.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-163 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "constructor"); + +assert.sameValue(desc.value, RegExp.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-165.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-165.js new file mode 100644 index 0000000000..bb3a204f5d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-165.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-165 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.exec) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "exec"); + +assert.sameValue(desc.value, RegExp.prototype.exec, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-166.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-166.js new file mode 100644 index 0000000000..e0bc70ad6a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-166.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-166 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.test) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "test"); + +assert.sameValue(desc.value, RegExp.prototype.test, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-167.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-167.js new file mode 100644 index 0000000000..26d6ce08ef --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-167.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-167 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "toString"); + +assert.sameValue(desc.value, RegExp.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-168.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-168.js new file mode 100644 index 0000000000..e0fe3f5569 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-168.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-168 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Error.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Error.prototype, "constructor"); + +assert.sameValue(desc.value, Error.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-169.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-169.js new file mode 100644 index 0000000000..f39abbf685 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-169.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-169 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Error.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Error.prototype, "toString"); + +assert.sameValue(desc.value, Error.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-17.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-17.js new file mode 100644 index 0000000000..4fd4086351 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-17.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-17 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.create) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "create"); + +assert.sameValue(desc.value, Object.create, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-170.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-170.js new file mode 100644 index 0000000000..f73e6d8836 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-170.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-170 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (EvalError.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(EvalError.prototype, "constructor"); + +assert.sameValue(desc.value, EvalError.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-171.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-171.js new file mode 100644 index 0000000000..c89f306a5e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-171.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-171 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RangeError.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RangeError.prototype, "constructor"); + +assert.sameValue(desc.value, RangeError.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-172.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-172.js new file mode 100644 index 0000000000..7214589979 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-172.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-172 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (ReferenceError.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(ReferenceError.prototype, "constructor"); + +assert.sameValue(desc.value, ReferenceError.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-173.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-173.js new file mode 100644 index 0000000000..9c711a2cbf --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-173.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-173 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (SyntaxError.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(SyntaxError.prototype, "constructor"); + +assert.sameValue(desc.value, SyntaxError.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-174.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-174.js new file mode 100644 index 0000000000..70176f98ca --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-174.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-174 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (TypeError.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(TypeError.prototype, "constructor"); + +assert.sameValue(desc.value, TypeError.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-175.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-175.js new file mode 100644 index 0000000000..b630d0ebaf --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-175.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-175 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (URIError.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(URIError.prototype, "constructor"); + +assert.sameValue(desc.value, URIError.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-176.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-176.js new file mode 100644 index 0000000000..11bee0214d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-176.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-176 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (JSON.stringify) +---*/ + +var desc = Object.getOwnPropertyDescriptor(JSON, "stringify"); + +assert.sameValue(desc.value, JSON.stringify, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-177.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-177.js new file mode 100644 index 0000000000..f79a9ae10f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-177.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-177 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (JSON.parse) +---*/ + +var desc = Object.getOwnPropertyDescriptor(JSON, "parse"); + +assert.sameValue(desc.value, JSON.parse, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js new file mode 100644 index 0000000000..f7d1b280df --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-178 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Global.NaN) +---*/ + +// in non-strict mode, 'this' is bound to the global object. +var desc = Object.getOwnPropertyDescriptor(this, "NaN"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js new file mode 100644 index 0000000000..ea0205e24f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-179 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Global.Infinity) +---*/ + +// in non-strict mode, 'this' is bound to the global object. +var desc = Object.getOwnPropertyDescriptor(this, "Infinity"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-18.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-18.js new file mode 100644 index 0000000000..7f658bbd3d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-18.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-18 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.defineProperty) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty"); + +assert.sameValue(desc.value, Object.defineProperty, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js new file mode 100644 index 0000000000..c12a0b7d51 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-180 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Global.undefined) +---*/ + +// in non-strict mode, 'this' is bound to the global object. +var desc = Object.getOwnPropertyDescriptor(this, "undefined"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-182.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-182.js new file mode 100644 index 0000000000..425a5102bb --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-182.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-182 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Object.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-183.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-183.js new file mode 100644 index 0000000000..3b89d372f2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-183.js @@ -0,0 +1,15 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-183 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + property (arguments_1) on built-in object (Function) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function, "arguments_1"); + +assert.sameValue(desc, undefined, 'desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-184.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-184.js new file mode 100644 index 0000000000..b70872ab7c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-184.js @@ -0,0 +1,15 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-184 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + property (caller) on built-in object (Math) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "caller"); + +assert.sameValue(desc, undefined, 'desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-185.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-185.js new file mode 100644 index 0000000000..605f20c296 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-185.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-185 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Function.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js new file mode 100644 index 0000000000..7b107ec576 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-186 +description: > + Object.getOwnPropertyDescriptor returns data desc for properties + on built-ins (Function.length) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function, "length"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js new file mode 100644 index 0000000000..cc6f4d5995 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js @@ -0,0 +1,21 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-187 +description: > + Object.getOwnPropertyDescriptor returns data desc for properties + on built-ins (Function (instance).length) +---*/ + +var f = Function('return 42;'); + +var desc = Object.getOwnPropertyDescriptor(f, "length"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-188.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-188.js new file mode 100644 index 0000000000..3adfe4f2de --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-188.js @@ -0,0 +1,16 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-188 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + properties on built-ins (Function (instance).name) +---*/ + +var f = Function('return 42;'); +var desc = Object.getOwnPropertyDescriptor(f, "functionNameHopefullyDoesNotExist"); + +assert.sameValue(desc, undefined, 'desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-189.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-189.js new file mode 100644 index 0000000000..006e3aa3b7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-189.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-189 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Array.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-19.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-19.js new file mode 100644 index 0000000000..a1fbbf2921 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-19.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-19 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.defineProperties) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties"); + +assert.sameValue(desc.value, Object.defineProperties, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-190.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-190.js new file mode 100644 index 0000000000..d4ee6e7174 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-190.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-190 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (String.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js new file mode 100644 index 0000000000..3ae8370e84 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-191 +description: > + Object.getOwnPropertyDescriptor returns data desc for properties + on built-ins (String.length) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String, "length"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js new file mode 100644 index 0000000000..b49bf24e36 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-192 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (String (instance).length) +---*/ + +var s = new String("abc"); +var desc = Object.getOwnPropertyDescriptor(s, "length"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-193.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-193.js new file mode 100644 index 0000000000..e2a7e7d55a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-193.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-193 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Boolean.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Boolean, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js new file mode 100644 index 0000000000..c9519b940b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-194 +description: > + Object.getOwnPropertyDescriptor returns data desc for properties + on built-ins (Boolean.length) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Boolean, "length"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js new file mode 100644 index 0000000000..7f43128117 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-195 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-196.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-196.js new file mode 100644 index 0000000000..27d1f48734 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-196.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-196 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.MAX_VALUE) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "MAX_VALUE"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-197.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-197.js new file mode 100644 index 0000000000..7bddeadb33 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-197.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-197 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.MIN_VALUE) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "MIN_VALUE"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-198.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-198.js new file mode 100644 index 0000000000..0d07b3f85d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-198.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-198 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.NaN) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "NaN"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-199.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-199.js new file mode 100644 index 0000000000..d3c9bdab65 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-199.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-199 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.NEGATIVE_INFINITY) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "NEGATIVE_INFINITY"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-2.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-2.js new file mode 100644 index 0000000000..ba30aa8857 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-2.js @@ -0,0 +1,17 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-2 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + properties +---*/ + +var o = {}; + +var desc = Object.getOwnPropertyDescriptor(o, "foo"); + +assert.sameValue(desc, undefined, 'desc'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-20.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-20.js new file mode 100644 index 0000000000..3d713c9579 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-20.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-20 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.seal) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "seal"); + +assert.sameValue(desc.value, Object.seal, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-200.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-200.js new file mode 100644 index 0000000000..1c91baad5f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-200.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-200 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.POSITIVE_INFINITY) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "POSITIVE_INFINITY"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js new file mode 100644 index 0000000000..fdb7e7f990 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-201 +description: > + Object.getOwnPropertyDescriptor returns data desc for properties + on built-ins (Number.length) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number, "length"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js new file mode 100644 index 0000000000..bc15a7bad2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-202 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.E) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "E"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-203.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-203.js new file mode 100644 index 0000000000..810f1b4240 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-203.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-203 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LN10) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "LN10"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-204.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-204.js new file mode 100644 index 0000000000..095a19ffa7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-204.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-204 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LN2) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "LN2"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-205.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-205.js new file mode 100644 index 0000000000..b3e2729f82 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-205.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-205 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LOG2E) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "LOG2E"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-206.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-206.js new file mode 100644 index 0000000000..e32f662d76 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-206.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-206 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LOG10E) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "LOG10E"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-207.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-207.js new file mode 100644 index 0000000000..926f1a47e3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-207.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-207 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.PI) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "PI"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-208.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-208.js new file mode 100644 index 0000000000..130b691b24 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-208.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-208 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.SQRT1_2) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "SQRT1_2"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-209.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-209.js new file mode 100644 index 0000000000..e8e1ce2593 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-209.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-209 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.SQRT2) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "SQRT2"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-21.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-21.js new file mode 100644 index 0000000000..372af5925c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-21.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-21 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.freeze) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "freeze"); + +assert.sameValue(desc.value, Object.freeze, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-210.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-210.js new file mode 100644 index 0000000000..6627fbc6d9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-210.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-210 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Date.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Date, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-211.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-211.js new file mode 100644 index 0000000000..c2c318e9da --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-211.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-211 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RegExp.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-212.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-212.js new file mode 100644 index 0000000000..db63609de5 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-212.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-212 +description: > + Object.getOwnPropertyDescriptor returns accessor desc for + accessors on built-ins (RegExp.prototype.source) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "source"); + +assert.sameValue(desc.hasOwnProperty('writable'), false, 'desc.hasOwnProperty("writable")'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(typeof desc.get, 'function', 'typeof desc.get'); +assert.sameValue(desc.set, undefined, 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-213.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-213.js new file mode 100644 index 0000000000..7ab60020d1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-213.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-213 +description: > + Object.getOwnPropertyDescriptor returns accessor desc for + accessors on built-ins (RegExp.prototype.global) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global"); + +assert.sameValue(desc.hasOwnProperty('writable'), false, 'desc.hasOwnProperty("writable")'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(typeof desc.get, 'function', 'typeof desc.get'); +assert.sameValue(desc.set, undefined, 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-214.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-214.js new file mode 100644 index 0000000000..f31934c5a8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-214.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-214 +description: > + Object.getOwnPropertyDescriptor returns accessor desc for + accessors on built-ins (RegExp.prototype.ignoreCase) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase"); + +assert.sameValue(desc.hasOwnProperty('writable'), false, 'desc.hasOwnProperty("writable")'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(typeof desc.get, 'function', 'typeof desc.get'); +assert.sameValue(desc.set, undefined, 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-215.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-215.js new file mode 100644 index 0000000000..c8ad302670 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-215.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-215 +description: > + Object.getOwnPropertyDescriptor returns accessor desc for + accessors on built-ins (RegExp.prototype.multiline) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline"); + +assert.sameValue(desc.hasOwnProperty('writable'), false, 'desc.hasOwnProperty("writable")'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); +assert.sameValue(typeof desc.get, 'function', 'typeof desc.get'); +assert.sameValue(desc.set, undefined, 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-216.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-216.js new file mode 100644 index 0000000000..f47ac73c46 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-216.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-216 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Error.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Error, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-217.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-217.js new file mode 100644 index 0000000000..3cc770a3a6 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-217.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-217 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (EvalError.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(EvalError, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-218.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-218.js new file mode 100644 index 0000000000..9e7dfdd289 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-218.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-218 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RangeError.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(RangeError, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-219.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-219.js new file mode 100644 index 0000000000..af360b7283 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-219.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-219 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (ReferenceError.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(ReferenceError, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-22.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-22.js new file mode 100644 index 0000000000..f16ab1db74 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-22.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-22 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.preventExtensions) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions"); + +assert.sameValue(desc.value, Object.preventExtensions, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-220.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-220.js new file mode 100644 index 0000000000..3eae72714a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-220.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-220 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (SyntaxError.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(SyntaxError, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-221.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-221.js new file mode 100644 index 0000000000..6dff9d1a2c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-221.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-221 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (TypeError.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(TypeError, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-222.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-222.js new file mode 100644 index 0000000000..bc0f7da6a4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-222.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-222 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (URIError.prototype) +---*/ + +var desc = Object.getOwnPropertyDescriptor(URIError, "prototype"); + +assert.sameValue(desc.writable, false, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); +assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); +assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-223.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-223.js new file mode 100644 index 0000000000..2bd0041cfd --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-223.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-223 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'value' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.value, "ownDataProperty", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-224.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-224.js new file mode 100644 index 0000000000..eb31a99398 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-224.js @@ -0,0 +1,21 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-224 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'writable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +desc.value = "overwriteDataProperty"; + +assert.sameValue(desc.value, "overwriteDataProperty", 'desc.value'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-225.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-225.js new file mode 100644 index 0000000000..84f15fb669 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-225.js @@ -0,0 +1,27 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-225 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'enumerable' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); +var accessed = false; + +for (var prop in desc) { + if (prop === "value") { + accessed = true; + } +} + +assert(accessed, 'accessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-226.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-226.js new file mode 100644 index 0000000000..4751c5ff0e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-226.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-226 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'configurable' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +var propDefined = "value" in desc; + +delete desc.value; +var propDeleted = "value" in desc; + +assert(propDefined, 'propDefined !== true'); +assert.sameValue(propDeleted, false, 'propDeleted'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-227.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-227.js new file mode 100644 index 0000000000..7fc5895443 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-227.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-227 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'value' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.writable, true, 'desc.writable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-228.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-228.js new file mode 100644 index 0000000000..c7b9b74cc9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-228.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-228 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'writable' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +desc.writable = "overwriteDataProperty"; + +assert.sameValue(desc.writable, "overwriteDataProperty", 'desc.writable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-229.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-229.js new file mode 100644 index 0000000000..bf14d985f1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-229.js @@ -0,0 +1,27 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-229 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'enumerable' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); +var accessed = false; + +for (var props in desc) { + if (props === "writable") { + accessed = true; + } +} + +assert(accessed, 'accessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-23.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-23.js new file mode 100644 index 0000000000..ce5420d4d0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-23.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-23 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.isSealed) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "isSealed"); + +assert.sameValue(desc.value, Object.isSealed, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-230.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-230.js new file mode 100644 index 0000000000..bd177ef9cc --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-230.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-230 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'configurable' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +var propDefined = ("writable" in desc); + +delete desc.writable; +var propDeleted = "writable" in desc; + +assert(propDefined, 'propDefined !== true'); +assert.sameValue(propDeleted, false, 'propDeleted'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-231.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-231.js new file mode 100644 index 0000000000..1b29bf914c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-231.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-231 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct 'value' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.enumerable, true, 'desc.enumerable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-232.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-232.js new file mode 100644 index 0000000000..5638dba1ea --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-232.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-232 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct + 'writable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +desc.enumerable = "overwriteDataProperty"; + +assert.sameValue(desc.enumerable, "overwriteDataProperty", 'desc.enumerable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-233.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-233.js new file mode 100644 index 0000000000..a0a304e8fc --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-233.js @@ -0,0 +1,27 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-233 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct + 'enumerable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); +var accessed = false; + +for (var props in desc) { + if (props === "enumerable") { + accessed = true; + } +} + +assert(accessed, 'accessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-234.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-234.js new file mode 100644 index 0000000000..8df4878d91 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-234.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-234 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct + 'configurable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +var propDefined = "enumerable" in desc; + +delete desc.enumerable; +var propDeleted = "enumerable" in desc; + +assert(propDefined, 'propDefined !== true'); +assert.sameValue(propDeleted, false, 'propDeleted'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-235.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-235.js new file mode 100644 index 0000000000..e4b48f40d1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-235.js @@ -0,0 +1,20 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-235 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct 'value' + attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-236.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-236.js new file mode 100644 index 0000000000..f6b87d663d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-236.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-236 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct + 'writable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +desc.writable = "overwriteDataProperty"; + +assert.sameValue(desc.writable, "overwriteDataProperty", 'desc.writable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-237.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-237.js new file mode 100644 index 0000000000..0c435d80cc --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-237.js @@ -0,0 +1,27 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-237 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct + 'enumerable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); +var accessed = false; + +for (var prop in desc) { + if (prop === "configurable") { + accessed = true; + } +} + +assert(accessed, 'accessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-238.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-238.js new file mode 100644 index 0000000000..73d89c7085 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-238.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-238 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct + 'configurable' attribute +---*/ + +var obj = { + "property": "ownDataProperty" +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +var propDefined = "configurable" in desc; + +delete desc.configurable; +var propDeleted = "configurable" in desc; + +assert(propDefined, 'propDefined !== true'); +assert.sameValue(propDeleted, false, 'propDeleted'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-239.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-239.js new file mode 100644 index 0000000000..30acb61693 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-239.js @@ -0,0 +1,24 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-239 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'value' attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownDataProperty"; +}; +Object.defineProperty(obj, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.get, fun, 'desc.get'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-24.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-24.js new file mode 100644 index 0000000000..7ae3aef657 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-24.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-24 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.isFrozen) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen"); + +assert.sameValue(desc.value, Object.isFrozen, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-240.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-240.js new file mode 100644 index 0000000000..a46946486a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-240.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-240 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'writable' attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownGetProperty"; +}; +Object.defineProperty(obj, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +desc.get = "overwriteGetProperty"; + +assert.sameValue(desc.get, "overwriteGetProperty", 'desc.get'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-241.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-241.js new file mode 100644 index 0000000000..ca68c85bb4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-241.js @@ -0,0 +1,32 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-241 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'enumerable' + attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownDataProperty"; +}; +Object.defineProperty(obj, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); +var accessed = false; + +for (var prop in desc) { + if (prop === "get") { + accessed = true; + } +} + +assert(accessed, 'accessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-242.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-242.js new file mode 100644 index 0000000000..b467d098d3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-242.js @@ -0,0 +1,31 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-242 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'configurable' + attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownDataProperty"; +}; +Object.defineProperty(obj, "property", { + get: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +var propDefined = "get" in desc; + +delete desc.get; +var propDeleted = "get" in desc; + +assert(propDefined, 'propDefined !== true'); +assert.sameValue(propDeleted, false, 'propDeleted'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-243.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-243.js new file mode 100644 index 0000000000..087133ab6e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-243.js @@ -0,0 +1,24 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-243 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'value' attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownSetProperty"; +}; +Object.defineProperty(obj, "property", { + set: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert.sameValue(desc.set, fun, 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-244.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-244.js new file mode 100644 index 0000000000..062e117262 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-244.js @@ -0,0 +1,26 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-244 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'writable' attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownSetProperty"; +}; +Object.defineProperty(obj, "property", { + set: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +desc.set = "overwriteSetProperty"; + +assert.sameValue(desc.set, "overwriteSetProperty", 'desc.set'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-245.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-245.js new file mode 100644 index 0000000000..0b78b68e16 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-245.js @@ -0,0 +1,32 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-245 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'enumerable' + attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownSetProperty"; +}; +Object.defineProperty(obj, "property", { + set: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); +var accessed = false; + +for (var prop in desc) { + if (prop === "set") { + accessed = true; + } +} + +assert(accessed, 'accessed !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-246.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-246.js new file mode 100644 index 0000000000..410c27ac8a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-246.js @@ -0,0 +1,31 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-246 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'configurable' + attribute +---*/ + +var obj = {}; +var fun = function() { + return "ownSetProperty"; +}; +Object.defineProperty(obj, "property", { + set: fun, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +var propDefined = "set" in desc; + +delete desc.set; +var propDeleted = "set" in desc; + +assert(propDefined, 'propDefined !== true'); +assert.sameValue(propDeleted, false, 'propDeleted'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-247.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-247.js new file mode 100644 index 0000000000..0021504dd1 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-247.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-247 +description: > + Object.getOwnPropertyDescriptor - returned value is an instance of + object +---*/ + +var obj = { + "property": 100 +}; + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert(desc instanceof Object, 'desc instanceof Object !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-248.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-248.js new file mode 100644 index 0000000000..fc2aeef3e5 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-248.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-248 +description: > + Object.getOwnPropertyDescriptor - returned object contains the + property 'value' if the value of property 'value' is not + explicitly specified when defined by Object.defineProperty +---*/ + +var obj = {}; +Object.defineProperty(obj, "property", { + writable: true, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert("value" in desc, '"value" in desc !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-249.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-249.js new file mode 100644 index 0000000000..95524c4c88 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-249.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-249 +description: > + Object.getOwnPropertyDescriptor - returned object contains the + property 'set' if the value of property 'set' is not explicitly + specified when defined by Object.defineProperty. +---*/ + +var obj = {}; +Object.defineProperty(obj, "property", { + get: function() {}, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert("set" in desc, '"set" in desc !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-25.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-25.js new file mode 100644 index 0000000000..ca213ff477 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-25.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-25 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.isExtensible) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible"); + +assert.sameValue(desc.value, Object.isExtensible, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-250.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-250.js new file mode 100644 index 0000000000..a56f525cf0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-250.js @@ -0,0 +1,22 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-250 +description: > + Object.getOwnPropertyDescriptor - returned object contains the + property 'get' if the value of property 'get' is not explicitly + specified when defined by Object.defineProperty. +---*/ + +var obj = {}; +Object.defineProperty(obj, "property", { + set: function() {}, + configurable: true +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "property"); + +assert("get" in desc, '"get" in desc !== true'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-26.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-26.js new file mode 100644 index 0000000000..866ad4b1b4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-26.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-26 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.keys) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object, "keys"); + +assert.sameValue(desc.value, Object.keys, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-27.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-27.js new file mode 100644 index 0000000000..1627606565 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-27.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-27 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor"); + +assert.sameValue(desc.value, Object.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-28.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-28.js new file mode 100644 index 0000000000..bc1720d501 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-28.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-28 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toString"); + +assert.sameValue(desc.value, Object.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-29.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-29.js new file mode 100644 index 0000000000..34a582dd2b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-29.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-29 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.valueOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "valueOf"); + +assert.sameValue(desc.value, Object.prototype.valueOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-3.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-3.js new file mode 100644 index 0000000000..665fedeb26 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-3.js @@ -0,0 +1,30 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-3 +description: > + Object.getOwnPropertyDescriptor returns an object representing an + accessor desc for valid accessor properties +---*/ + +var o = {}; + +// dummy getter +var getter = function() { + return 1; +} +var d = { + get: getter +}; + +Object.defineProperty(o, "foo", d); + +var desc = Object.getOwnPropertyDescriptor(o, "foo"); + +assert.sameValue(desc.get, getter, 'desc.get'); +assert.sameValue(desc.set, undefined, 'desc.set'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, false, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-30.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-30.js new file mode 100644 index 0000000000..335bb6ed51 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-30.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-30 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.isPrototypeOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "isPrototypeOf"); + +assert.sameValue(desc.value, Object.prototype.isPrototypeOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-31.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-31.js new file mode 100644 index 0000000000..9d31bbb873 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-31.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-31 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.hasOwnProperty) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "hasOwnProperty"); + +assert.sameValue(desc.value, Object.prototype.hasOwnProperty, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-32.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-32.js new file mode 100644 index 0000000000..efab129600 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-32.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-32 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.propertyIsEnumerable) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "propertyIsEnumerable"); + +assert.sameValue(desc.value, Object.prototype.propertyIsEnumerable, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-33.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-33.js new file mode 100644 index 0000000000..fab259eea9 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-33.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-33 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.toLocaleString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toLocaleString"); + +assert.sameValue(desc.value, Object.prototype.toLocaleString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-34.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-34.js new file mode 100644 index 0000000000..f1cd3d8a6e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-34.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-34 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function.prototype, "constructor"); + +assert.sameValue(desc.value, Function.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-35.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-35.js new file mode 100644 index 0000000000..11c1377559 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-35.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-35 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); + +assert.sameValue(desc.value, Function.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-36.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-36.js new file mode 100644 index 0000000000..c5f07a8cc0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-36.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-36 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.apply) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function.prototype, "apply"); + +assert.sameValue(desc.value, Function.prototype.apply, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-37.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-37.js new file mode 100644 index 0000000000..97b2e4d5f7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-37.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-37 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.call) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function.prototype, "call"); + +assert.sameValue(desc.value, Function.prototype.call, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-38.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-38.js new file mode 100644 index 0000000000..9a98a1e682 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-38.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-38 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.bind) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind"); + +assert.sameValue(desc.value, Function.prototype.bind, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-39.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-39.js new file mode 100644 index 0000000000..07ed450b26 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-39.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-39 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "constructor"); + +assert.sameValue(desc.value, Array.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js new file mode 100644 index 0000000000..6236cb3129 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-4 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.eval) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "eval"); + +assert.sameValue(desc.value, global.eval, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-40.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-40.js new file mode 100644 index 0000000000..6e8ebfded0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-40.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-40 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.concat) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "concat"); + +assert.sameValue(desc.value, Array.prototype.concat, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-41.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-41.js new file mode 100644 index 0000000000..262643ef51 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-41.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-41 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.join) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "join"); + +assert.sameValue(desc.value, Array.prototype.join, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-42.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-42.js new file mode 100644 index 0000000000..a26ce340df --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-42.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-42 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.reverse) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reverse"); + +assert.sameValue(desc.value, Array.prototype.reverse, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-43.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-43.js new file mode 100644 index 0000000000..76b806cb2a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-43.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-43 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.slice) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "slice"); + +assert.sameValue(desc.value, Array.prototype.slice, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-44.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-44.js new file mode 100644 index 0000000000..a451a8ba28 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-44.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-44 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.sort) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "sort"); + +assert.sameValue(desc.value, Array.prototype.sort, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-45.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-45.js new file mode 100644 index 0000000000..ba97991bf8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-45.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-45 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toString"); + +assert.sameValue(desc.value, Array.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-46.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-46.js new file mode 100644 index 0000000000..cdc116c826 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-46.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-46 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.push) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "push"); + +assert.sameValue(desc.value, Array.prototype.push, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-47.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-47.js new file mode 100644 index 0000000000..f22030ba6e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-47.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-47 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.pop) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "pop"); + +assert.sameValue(desc.value, Array.prototype.pop, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-48.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-48.js new file mode 100644 index 0000000000..d09e40394b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-48.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-48 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.shift) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "shift"); + +assert.sameValue(desc.value, Array.prototype.shift, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-49.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-49.js new file mode 100644 index 0000000000..d6aa49706f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-49.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-49 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.unshift) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "unshift"); + +assert.sameValue(desc.value, Array.prototype.unshift, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js new file mode 100644 index 0000000000..6e26629d3d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-5 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.parseInt) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "parseInt"); + +assert.sameValue(desc.value, global.parseInt, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-50.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-50.js new file mode 100644 index 0000000000..688471b9dd --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-50.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-50 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.splice) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "splice"); + +assert.sameValue(desc.value, Array.prototype.splice, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-51.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-51.js new file mode 100644 index 0000000000..860edfc307 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-51.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-51 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.toLocaleString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toLocaleString"); + +assert.sameValue(desc.value, Array.prototype.toLocaleString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-52.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-52.js new file mode 100644 index 0000000000..415f360499 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-52.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-52 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.indexOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf"); + +assert.sameValue(desc.value, Array.prototype.indexOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-53.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-53.js new file mode 100644 index 0000000000..0b13425630 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-53.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-53 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.lastIndexOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf"); + +assert.sameValue(desc.value, Array.prototype.lastIndexOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-54.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-54.js new file mode 100644 index 0000000000..43fb34a02a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-54.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-54 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.every) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every"); + +assert.sameValue(desc.value, Array.prototype.every, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-55.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-55.js new file mode 100644 index 0000000000..e5b699c4fc --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-55.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-55 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.some) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some"); + +assert.sameValue(desc.value, Array.prototype.some, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-56.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-56.js new file mode 100644 index 0000000000..e8d73ca12e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-56.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-56 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.forEach) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach"); + +assert.sameValue(desc.value, Array.prototype.forEach, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-57.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-57.js new file mode 100644 index 0000000000..76b1657d15 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-57.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-57 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.map) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map"); + +assert.sameValue(desc.value, Array.prototype.map, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-58.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-58.js new file mode 100644 index 0000000000..fdf25934b7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-58.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-58 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.filter) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter"); + +assert.sameValue(desc.value, Array.prototype.filter, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-59.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-59.js new file mode 100644 index 0000000000..9e783f9198 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-59.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-59 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.reduce) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); + +assert.sameValue(desc.value, Array.prototype.reduce, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js new file mode 100644 index 0000000000..e8c156452b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-6 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.parseFloat) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "parseFloat"); + +assert.sameValue(desc.value, global.parseFloat, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-60.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-60.js new file mode 100644 index 0000000000..a6a9ef79ba --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-60.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-60 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.reduceRight) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight"); + +assert.sameValue(desc.value, Array.prototype.reduceRight, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-61.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-61.js new file mode 100644 index 0000000000..6c476afb0a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-61.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-61 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.fromCharCode) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String, "fromCharCode"); + +assert.sameValue(desc.value, String.fromCharCode, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-62.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-62.js new file mode 100644 index 0000000000..1833ef4ecb --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-62.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-62 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "constructor"); + +assert.sameValue(desc.value, String.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-63.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-63.js new file mode 100644 index 0000000000..aba9c72151 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-63.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-63 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.charAt) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "charAt"); + +assert.sameValue(desc.value, String.prototype.charAt, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-64.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-64.js new file mode 100644 index 0000000000..bdbe8f1489 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-64.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-64 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.charCodeAt) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "charCodeAt"); + +assert.sameValue(desc.value, String.prototype.charCodeAt, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-65.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-65.js new file mode 100644 index 0000000000..1ea1692892 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-65.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-65 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.concat) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "concat"); + +assert.sameValue(desc.value, String.prototype.concat, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-66.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-66.js new file mode 100644 index 0000000000..b227e759af --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-66.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-66 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.indexOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "indexOf"); + +assert.sameValue(desc.value, String.prototype.indexOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-67.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-67.js new file mode 100644 index 0000000000..be42df3691 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-67.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-67 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.lastIndexOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "lastIndexOf"); + +assert.sameValue(desc.value, String.prototype.lastIndexOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-68.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-68.js new file mode 100644 index 0000000000..1f86913651 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-68.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-68 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.match) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); + +assert.sameValue(desc.value, String.prototype.match, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-69.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-69.js new file mode 100644 index 0000000000..24b6448499 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-69.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-69 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.replace) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "replace"); + +assert.sameValue(desc.value, String.prototype.replace, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js new file mode 100644 index 0000000000..b94227b295 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-7 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.isNaN) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "isNaN"); + +assert.sameValue(desc.value, global.isNaN, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-70.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-70.js new file mode 100644 index 0000000000..c7a7af9a14 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-70.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-70 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.search) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "search"); + +assert.sameValue(desc.value, String.prototype.search, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-71.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-71.js new file mode 100644 index 0000000000..48dc039f25 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-71.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-71 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.slice) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "slice"); + +assert.sameValue(desc.value, String.prototype.slice, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-72.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-72.js new file mode 100644 index 0000000000..30f8f837c8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-72.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-72 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.split) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "split"); + +assert.sameValue(desc.value, String.prototype.split, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-73.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-73.js new file mode 100644 index 0000000000..a39309e25c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-73.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-73 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.substring) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "substring"); + +assert.sameValue(desc.value, String.prototype.substring, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-75.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-75.js new file mode 100644 index 0000000000..e7dc9d491b --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-75.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-75 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toLowerCase) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLowerCase"); + +assert.sameValue(desc.value, String.prototype.toLowerCase, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-76.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-76.js new file mode 100644 index 0000000000..15287a82d8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-76.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-76 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "toString"); + +assert.sameValue(desc.value, String.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-77.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-77.js new file mode 100644 index 0000000000..f77e8a409f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-77.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-77 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toUpperCase) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "toUpperCase"); + +assert.sameValue(desc.value, String.prototype.toUpperCase, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-78.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-78.js new file mode 100644 index 0000000000..59a3cff252 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-78.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-78 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.valueOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "valueOf"); + +assert.sameValue(desc.value, String.prototype.valueOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-79.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-79.js new file mode 100644 index 0000000000..952cef2fd8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-79.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-79 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toLocaleLowerCase) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleLowerCase"); + +assert.sameValue(desc.value, String.prototype.toLocaleLowerCase, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js new file mode 100644 index 0000000000..d1735d1160 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-8 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.isFinite) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "isFinite"); + +assert.sameValue(desc.value, global.isFinite, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-80.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-80.js new file mode 100644 index 0000000000..60f04f718a --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-80.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-80 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toLocaleUpperCase) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleUpperCase"); + +assert.sameValue(desc.value, String.prototype.toLocaleUpperCase, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-81.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-81.js new file mode 100644 index 0000000000..3407ac9acd --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-81.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-81 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.localeCompare) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "localeCompare"); + +assert.sameValue(desc.value, String.prototype.localeCompare, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-82.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-82.js new file mode 100644 index 0000000000..02ee971728 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-82.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-82 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.trim) +---*/ + +var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim"); + +assert.sameValue(desc.value, String.prototype.trim, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-84.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-84.js new file mode 100644 index 0000000000..f8838a37e7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-84.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-84 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Boolean.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "constructor"); + +assert.sameValue(desc.value, Boolean.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-85.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-85.js new file mode 100644 index 0000000000..87db392c26 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-85.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-85 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Boolean.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "toString"); + +assert.sameValue(desc.value, Boolean.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-86.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-86.js new file mode 100644 index 0000000000..1a975b833c --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-86.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-86 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Boolean.prototype.valueOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "valueOf"); + +assert.sameValue(desc.value, Boolean.prototype.valueOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-88.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-88.js new file mode 100644 index 0000000000..953b4a72b0 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-88.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-88 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.constructor) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "constructor"); + +assert.sameValue(desc.value, Number.prototype.constructor, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-89.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-89.js new file mode 100644 index 0000000000..209c97b996 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-89.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-89 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toString"); + +assert.sameValue(desc.value, Number.prototype.toString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js new file mode 100644 index 0000000000..cc8d7dc3ff --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js @@ -0,0 +1,19 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-9 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.decodeURI) +---*/ + +var global = this; +var desc = Object.getOwnPropertyDescriptor(global, "decodeURI"); + +assert.sameValue(desc.value, global.decodeURI, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-90.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-90.js new file mode 100644 index 0000000000..2cc25ecc4d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-90.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-90 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toLocaleString) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toLocaleString"); + +assert.sameValue(desc.value, Number.prototype.toLocaleString, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-91.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-91.js new file mode 100644 index 0000000000..3786fa4adb --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-91.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-91 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toFixed) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toFixed"); + +assert.sameValue(desc.value, Number.prototype.toFixed, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-92.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-92.js new file mode 100644 index 0000000000..e67bd4bc1d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-92.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-92 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toExponential) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toExponential"); + +assert.sameValue(desc.value, Number.prototype.toExponential, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-93.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-93.js new file mode 100644 index 0000000000..79bfae84cb --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-93.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-93 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toPrecision) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toPrecision"); + +assert.sameValue(desc.value, Number.prototype.toPrecision, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-94.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-94.js new file mode 100644 index 0000000000..f1d73c25f6 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-94.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-94 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.valueOf) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Number.prototype, "valueOf"); + +assert.sameValue(desc.value, Number.prototype.valueOf, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-96.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-96.js new file mode 100644 index 0000000000..244ce85c31 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-96.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-96 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.abs) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "abs"); + +assert.sameValue(desc.value, Math.abs, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-97.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-97.js new file mode 100644 index 0000000000..ee57711a7d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-97.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-97 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.acos) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "acos"); + +assert.sameValue(desc.value, Math.acos, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-98.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-98.js new file mode 100644 index 0000000000..6c9a049b70 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-98.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-98 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.asin) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "asin"); + +assert.sameValue(desc.value, Math.asin, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-99.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-99.js new file mode 100644 index 0000000000..7e707675af --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-99.js @@ -0,0 +1,18 @@ +// Copyright (c) 2012 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 15.2.3.3-4-99 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.atan) +---*/ + +var desc = Object.getOwnPropertyDescriptor(Math, "atan"); + +assert.sameValue(desc.value, Math.atan, 'desc.value'); +assert.sameValue(desc.writable, true, 'desc.writable'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/browser.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/browser.js diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/length.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/length.js new file mode 100644 index 0000000000..4db7e7e00f --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/length.js @@ -0,0 +1,29 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-object.getownpropertydescriptor +description: > + Object.getOwnPropertyDescriptor.length is 2. +info: | + Object.getOwnPropertyDescriptor ( O, P ) + + ECMAScript Standard Built-in Objects + + Every built-in function object, including constructors, has a "length" property whose + value is an integer. Unless otherwise specified, this value is equal to the largest + number of named arguments shown in the subclause headings for the function description. + + Unless otherwise specified, the "length" property of a built-in function object has + the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +verifyProperty(Object.getOwnPropertyDescriptor, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js new file mode 100644 index 0000000000..8752810f81 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2015 AndrĂ© Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 19.1.2.6 +description: > + Object.getOwnPropertyDescriptor.name is "getOwnPropertyDescriptor". +info: | + Object.getOwnPropertyDescriptor ( O, P ) + + 17 ECMAScript Standard Built-in Objects: + Every built-in Function object, including constructors, that is not + identified as an anonymous function has a name property whose value + is a String. + + Unless otherwise specified, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Object.getOwnPropertyDescriptor.name, "getOwnPropertyDescriptor"); + +verifyNotEnumerable(Object.getOwnPropertyDescriptor, "name"); +verifyNotWritable(Object.getOwnPropertyDescriptor, "name"); +verifyConfigurable(Object.getOwnPropertyDescriptor, "name"); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js new file mode 100644 index 0000000000..af851726d6 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js @@ -0,0 +1,35 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-ecmascript-standard-built-in-objects +description: > + Object.getOwnPropertyDescriptor does not implement [[Construct]], is not new-able +info: | + ECMAScript Function Objects + + Built-in function objects that are not identified as constructors do not + implement the [[Construct]] internal method unless otherwise specified in + the description of a particular function. + + sec-evaluatenew + + ... + 7. If IsConstructor(constructor) is false, throw a TypeError exception. + ... +includes: [isConstructor.js] +features: [Reflect.construct, arrow-function] +---*/ + +assert.sameValue( + isConstructor(Object.getOwnPropertyDescriptor), + false, + 'isConstructor(Object.getOwnPropertyDescriptor) must return false' +); + +assert.throws(TypeError, () => { + new Object.getOwnPropertyDescriptor({}, ''); +}, '`new Object.getOwnPropertyDescriptor({}, \'\')` throws TypeError'); + + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js new file mode 100644 index 0000000000..930438eb75 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/primitive-string.js @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-object.getownpropertydescriptor +description: > + String primitive as first argument is coerced to object. +info: | + Object.getOwnPropertyDescriptor ( O, P ) + + 1. Let obj be ? ToObject(O). + [...] + 3. Let desc be ? obj.[[GetOwnProperty]](key). + 4. Return FromPropertyDescriptor(desc). + + String Exotic Objects + + String exotic objects always have a data property named "length" whose value is the number + of code unit elements in the encapsulated String value. Both the code unit data properties + and the "length" property are non-writable and non-configurable. +---*/ + +assert.sameValue(Object.getOwnPropertyDescriptor('', '0'), undefined); + +var indexDesc = Object.getOwnPropertyDescriptor('foo', '0'); + +assert.sameValue(indexDesc.value, 'f', '[[Value]]'); +assert.sameValue(indexDesc.writable, false, '[[Writable]]'); +assert.sameValue(indexDesc.enumerable, true, '[[Enumerable]]'); +assert.sameValue(indexDesc.configurable, false, '[[Configurable]]'); + +var lengthDesc = Object.getOwnPropertyDescriptor('foo', 'length'); + +assert.sameValue(lengthDesc.value, 3, '[[Value]]'); +assert.sameValue(lengthDesc.writable, false, '[[Writable]]'); +assert.sameValue(lengthDesc.enumerable, false, '[[Enumerable]]'); +assert.sameValue(lengthDesc.configurable, false, '[[Configurable]]'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/primitive-symbol.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/primitive-symbol.js new file mode 100644 index 0000000000..c166aadc56 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/primitive-symbol.js @@ -0,0 +1,27 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-object.getownpropertydescriptor +description: > + Symbol primitive as first argument is coerced to object. +info: | + Object.getOwnPropertyDescriptor ( O, P ) + + 1. Let obj be ? ToObject(O). + [...] + 3. Let desc be ? obj.[[GetOwnProperty]](key). + 4. Return FromPropertyDescriptor(desc). + + Properties of Symbol Instances + + Symbol instances are ordinary objects that inherit properties from the Symbol prototype object. + Symbol instances have a [[SymbolData]] internal slot. + The [[SymbolData]] internal slot is the Symbol value represented by this Symbol object. +features: [Symbol] +---*/ + +assert.sameValue(Object.getOwnPropertyDescriptor(Symbol(), 'foo'), undefined); +assert.sameValue(Object.getOwnPropertyDescriptor(Symbol('foo'), 'description'), undefined); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/shell.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/shell.js |