summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2017-12-21 12:08:25 -0800
committerRick Waldron <waldron.rick@gmail.com>2017-12-21 16:46:56 -0500
commit4337b396bd07a7e8e566045bfe230db8f51ad737 (patch)
tree46922341bfa8df4bfba372fe992e8087e33018a8 /harness
parent513a3056fb4da9be59346d8126e38d81e7e98272 (diff)
downloadqtdeclarative-testsuites-4337b396bd07a7e8e566045bfe230db8f51ad737.tar.gz
Add separate test files for property attributes of Intl properties
Diffstat (limited to 'harness')
-rw-r--r--harness/testBuiltInObject.js32
1 files changed, 1 insertions, 31 deletions
diff --git a/harness/testBuiltInObject.js b/harness/testBuiltInObject.js
index 95fa2d3f6..a923cbb7a 100644
--- a/harness/testBuiltInObject.js
+++ b/harness/testBuiltInObject.js
@@ -11,12 +11,10 @@ description: |
* @param {Object} obj the object to be tested.
* @param {boolean} isFunction whether the specification describes obj as a function.
* @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.
* @author Norbert Lindenberg
*/
-function testBuiltInObject(obj, isFunction, isConstructor, properties) {
+function testBuiltInObject(obj, isFunction, isConstructor) {
if (obj === undefined) {
$ERROR("Object being tested is undefined.");
@@ -47,34 +45,6 @@ function testBuiltInObject(obj, isFunction, isConstructor, properties) {
$ERROR("Built-in prototype objects must have Object.prototype as their prototype.");
}
- // verification of the absence of the [[Construct]] internal property has
- // been moved to the end of the test
-
- // verification of the absence of the prototype property has
- // been moved to the end of the test
-
- properties.forEach(function(prop) {
- var desc = Object.getOwnPropertyDescriptor(obj, prop);
- if (desc === undefined) {
- $ERROR("Missing property " + prop + ".");
- }
- // accessor properties don't have writable attribute
- if (desc.hasOwnProperty("writable") && !desc.writable) {
- $ERROR("The " + prop + " property of this built-in object must be writable.");
- }
- if (desc.enumerable) {
- $ERROR("The " + prop + " property of this built-in object must not be enumerable.");
- }
- if (!desc.configurable) {
- $ERROR("The " + prop + " property of this built-in object must be configurable.");
- }
- });
-
- // The remaining sections have been moved to the end of the test because
- // unbound non-constructor functions written in JavaScript cannot possibly
- // pass them, and we still want to test JavaScript implementations as much
- // as possible.
-
var exception;
if (isFunction && !isConstructor) {
// this is not a complete test for the presence of [[Construct]]: