Use verifyProperty in test/intl402/Collator tests

This commit is contained in:
André Bargull 2023-09-11 15:43:36 +02:00 committed by Ms2ger
parent 534decc36d
commit 967b16500a
14 changed files with 78 additions and 59 deletions

View File

@ -24,8 +24,9 @@ info: |
includes: [propertyHelper.js]
---*/
assert.sameValue(Intl.Collator.length, 0);
verifyNotEnumerable(Intl.Collator, "length");
verifyNotWritable(Intl.Collator, "length");
verifyConfigurable(Intl.Collator, "length");
verifyProperty(Intl.Collator, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -19,8 +19,9 @@ info: |
includes: [propertyHelper.js]
---*/
assert.sameValue(Intl.Collator.name, "Collator");
verifyNotEnumerable(Intl.Collator, "name");
verifyNotWritable(Intl.Collator, "name");
verifyConfigurable(Intl.Collator, "name");
verifyProperty(Intl.Collator, "name", {
value: "Collator",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -24,6 +24,8 @@ info: |
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(Intl, "Collator");
verifyWritable(Intl, "Collator");
verifyConfigurable(Intl, "Collator");
verifyProperty(Intl, "Collator", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -21,8 +21,9 @@ includes: [propertyHelper.js]
var compareFn = new Intl.Collator().compare;
assert.sameValue(compareFn.length, 2);
verifyNotEnumerable(compareFn, "length");
verifyNotWritable(compareFn, "length");
verifyConfigurable(compareFn, "length");
verifyProperty(compareFn, "length", {
value: 2,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -26,8 +26,9 @@ includes: [propertyHelper.js]
var desc = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare");
assert.sameValue(desc.get.length, 0);
verifyNotEnumerable(desc.get, "length");
verifyNotWritable(desc.get, "length");
verifyConfigurable(desc.get, "length");
verifyProperty(desc.get, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -21,8 +21,9 @@ includes: [propertyHelper.js]
var desc = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare");
assert.sameValue(desc.get.name, "get compare");
verifyNotEnumerable(desc.get, "name");
verifyNotWritable(desc.get, "name");
verifyConfigurable(desc.get, "name");
verifyProperty(desc.get, "name", {
value: "get compare",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -31,5 +31,7 @@ var desc = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare");
assert.sameValue(desc.set, undefined);
assert.sameValue(typeof desc.get, "function");
verifyNotEnumerable(Intl.Collator.prototype, "compare");
verifyConfigurable(Intl.Collator.prototype, "compare");
verifyProperty(Intl.Collator.prototype, "compare", {
enumerable: false,
configurable: true,
});

View File

@ -24,6 +24,8 @@ info: |
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(Intl.Collator.prototype, "constructor");
verifyWritable(Intl.Collator.prototype, "constructor");
verifyConfigurable(Intl.Collator.prototype, "constructor");
verifyProperty(Intl.Collator.prototype, "constructor", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -24,8 +24,9 @@ info: |
includes: [propertyHelper.js]
---*/
assert.sameValue(Intl.Collator.prototype.resolvedOptions.length, 0);
verifyNotEnumerable(Intl.Collator.prototype.resolvedOptions, "length");
verifyNotWritable(Intl.Collator.prototype.resolvedOptions, "length");
verifyConfigurable(Intl.Collator.prototype.resolvedOptions, "length");
verifyProperty(Intl.Collator.prototype.resolvedOptions, "length", {
value: 0,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -19,8 +19,9 @@ info: |
includes: [propertyHelper.js]
---*/
assert.sameValue(Intl.Collator.prototype.resolvedOptions.name, "resolvedOptions");
verifyNotEnumerable(Intl.Collator.prototype.resolvedOptions, "name");
verifyNotWritable(Intl.Collator.prototype.resolvedOptions, "name");
verifyConfigurable(Intl.Collator.prototype.resolvedOptions, "name");
verifyProperty(Intl.Collator.prototype.resolvedOptions, "name", {
value: "resolvedOptions",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -24,6 +24,8 @@ info: |
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(Intl.Collator.prototype, "resolvedOptions");
verifyWritable(Intl.Collator.prototype, "resolvedOptions");
verifyConfigurable(Intl.Collator.prototype, "resolvedOptions");
verifyProperty(Intl.Collator.prototype, "resolvedOptions", {
writable: true,
enumerable: false,
configurable: true,
});

View File

@ -24,8 +24,9 @@ info: |
includes: [propertyHelper.js]
---*/
assert.sameValue(Intl.Collator.supportedLocalesOf.length, 1);
verifyNotEnumerable(Intl.Collator.supportedLocalesOf, "length");
verifyNotWritable(Intl.Collator.supportedLocalesOf, "length");
verifyConfigurable(Intl.Collator.supportedLocalesOf, "length");
verifyProperty(Intl.Collator.supportedLocalesOf, "length", {
value: 1,
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -19,8 +19,9 @@ info: |
includes: [propertyHelper.js]
---*/
assert.sameValue(Intl.Collator.supportedLocalesOf.name, "supportedLocalesOf");
verifyNotEnumerable(Intl.Collator.supportedLocalesOf, "name");
verifyNotWritable(Intl.Collator.supportedLocalesOf, "name");
verifyConfigurable(Intl.Collator.supportedLocalesOf, "name");
verifyProperty(Intl.Collator.supportedLocalesOf, "name", {
value: "supportedLocalesOf",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -24,6 +24,8 @@ info: |
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(Intl.Collator, "supportedLocalesOf");
verifyWritable(Intl.Collator, "supportedLocalesOf");
verifyConfigurable(Intl.Collator, "supportedLocalesOf");
verifyProperty(Intl.Collator, "supportedLocalesOf", {
writable: true,
enumerable: false,
configurable: true,
});