summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2017-12-21 12:08:24 -0800
committerRick Waldron <waldron.rick@gmail.com>2017-12-21 16:46:56 -0500
commit513a3056fb4da9be59346d8126e38d81e7e98272 (patch)
tree5a2e709330e505a72ad31f9ebc54fed33474521b /harness
parentc2c274fe8a83a9dbdcdcdffb0e3d2b5ab5d34c43 (diff)
downloadqtdeclarative-testsuites-513a3056fb4da9be59346d8126e38d81e7e98272.tar.gz
Add separate test files to test the length property of Intl functions
Diffstat (limited to 'harness')
-rw-r--r--harness/testBuiltInObject.js27
1 files changed, 1 insertions, 26 deletions
diff --git a/harness/testBuiltInObject.js b/harness/testBuiltInObject.js
index c78c0d732..95fa2d3f6 100644
--- a/harness/testBuiltInObject.js
+++ b/harness/testBuiltInObject.js
@@ -13,12 +13,10 @@ description: |
* @param {boolean} isConstructor whether the specification describes obj as a constructor.
* @param {String[]} properties an array with the names of the built-in properties of obj,
* excluding length, prototype, or properties with non-default attributes.
- * @param {number} length for functions only: the length specified for the function
- * or derived from the argument list.
* @author Norbert Lindenberg
*/
-function testBuiltInObject(obj, isFunction, isConstructor, properties, length) {
+function testBuiltInObject(obj, isFunction, isConstructor, properties) {
if (obj === undefined) {
$ERROR("Object being tested is undefined.");
@@ -55,29 +53,6 @@ function testBuiltInObject(obj, isFunction, isConstructor, properties, length) {
// verification of the absence of the prototype property has
// been moved to the end of the test
- if (isFunction) {
-
- if (typeof obj.length !== "number" || obj.length !== Math.floor(obj.length)) {
- $ERROR("Built-in functions must have a length property with an integer value.");
- }
-
- if (obj.length !== length) {
- $ERROR("Function's length property doesn't have specified value; expected " +
- length + ", got " + obj.length + ".");
- }
-
- var desc = Object.getOwnPropertyDescriptor(obj, "length");
- if (desc.writable) {
- $ERROR("The length property of a built-in function must not be writable.");
- }
- if (desc.enumerable) {
- $ERROR("The length property of a built-in function must not be enumerable.");
- }
- if (!desc.configurable) {
- $ERROR("The length property of a built-in function must be configurable.");
- }
- }
-
properties.forEach(function(prop) {
var desc = Object.getOwnPropertyDescriptor(obj, prop);
if (desc === undefined) {