mirror of https://github.com/tc39/test262.git
Use verifyProperty in test/intl402/DateTimeFormat tests
This commit is contained in:
parent
967b16500a
commit
fe2c17bf4b
|
@ -24,8 +24,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.DateTimeFormat.length, 0);
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat, "length");
|
||||
verifyNotWritable(Intl.DateTimeFormat, "length");
|
||||
verifyConfigurable(Intl.DateTimeFormat, "length");
|
||||
verifyProperty(Intl.DateTimeFormat, "length", {
|
||||
value: 0,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -19,8 +19,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.DateTimeFormat.name, "DateTimeFormat");
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat, "name");
|
||||
verifyNotWritable(Intl.DateTimeFormat, "name");
|
||||
verifyConfigurable(Intl.DateTimeFormat, "name");
|
||||
verifyProperty(Intl.DateTimeFormat, "name", {
|
||||
value: "DateTimeFormat",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -24,6 +24,8 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl, "DateTimeFormat");
|
||||
verifyWritable(Intl, "DateTimeFormat");
|
||||
verifyConfigurable(Intl, "DateTimeFormat");
|
||||
verifyProperty(Intl, "DateTimeFormat", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -24,6 +24,8 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, "constructor");
|
||||
verifyWritable(Intl.DateTimeFormat.prototype, "constructor");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, "constructor");
|
||||
verifyProperty(Intl.DateTimeFormat.prototype, "constructor", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -21,8 +21,9 @@ includes: [propertyHelper.js]
|
|||
|
||||
var formatFn = new Intl.DateTimeFormat().format;
|
||||
|
||||
assert.sameValue(formatFn.length, 1);
|
||||
|
||||
verifyNotEnumerable(formatFn, "length");
|
||||
verifyNotWritable(formatFn, "length");
|
||||
verifyConfigurable(formatFn, "length");
|
||||
verifyProperty(formatFn, "length", {
|
||||
value: 1,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -26,8 +26,9 @@ includes: [propertyHelper.js]
|
|||
|
||||
var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format");
|
||||
|
||||
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,
|
||||
});
|
||||
|
|
|
@ -21,8 +21,9 @@ includes: [propertyHelper.js]
|
|||
|
||||
var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format");
|
||||
|
||||
assert.sameValue(desc.get.name, "get format");
|
||||
|
||||
verifyNotEnumerable(desc.get, "name");
|
||||
verifyNotWritable(desc.get, "name");
|
||||
verifyConfigurable(desc.get, "name");
|
||||
verifyProperty(desc.get, "name", {
|
||||
value: "get format",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -31,5 +31,7 @@ var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "forma
|
|||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, "format");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, "format");
|
||||
verifyProperty(Intl.DateTimeFormat.prototype, "format", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -12,6 +12,8 @@ assert.sameValue(
|
|||
'`typeof Intl.DateTimeFormat.prototype.formatToParts` is `function`'
|
||||
);
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, 'formatToParts');
|
||||
verifyWritable(Intl.DateTimeFormat.prototype, 'formatToParts');
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, 'formatToParts');
|
||||
verifyProperty(Intl.DateTimeFormat.prototype, "formatToParts", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -24,8 +24,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.DateTimeFormat.prototype.resolvedOptions.length, 0);
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype.resolvedOptions, "length");
|
||||
verifyNotWritable(Intl.DateTimeFormat.prototype.resolvedOptions, "length");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype.resolvedOptions, "length");
|
||||
verifyProperty(Intl.DateTimeFormat.prototype.resolvedOptions, "length", {
|
||||
value: 0,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -19,8 +19,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.DateTimeFormat.prototype.resolvedOptions.name, "resolvedOptions");
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype.resolvedOptions, "name");
|
||||
verifyNotWritable(Intl.DateTimeFormat.prototype.resolvedOptions, "name");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype.resolvedOptions, "name");
|
||||
verifyProperty(Intl.DateTimeFormat.prototype.resolvedOptions, "name", {
|
||||
value: "resolvedOptions",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -24,6 +24,8 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, "resolvedOptions");
|
||||
verifyWritable(Intl.DateTimeFormat.prototype, "resolvedOptions");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, "resolvedOptions");
|
||||
verifyProperty(Intl.DateTimeFormat.prototype, "resolvedOptions", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -24,8 +24,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.DateTimeFormat.supportedLocalesOf.length, 1);
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.supportedLocalesOf, "length");
|
||||
verifyNotWritable(Intl.DateTimeFormat.supportedLocalesOf, "length");
|
||||
verifyConfigurable(Intl.DateTimeFormat.supportedLocalesOf, "length");
|
||||
verifyProperty(Intl.DateTimeFormat.supportedLocalesOf, "length", {
|
||||
value: 1,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -19,8 +19,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.DateTimeFormat.supportedLocalesOf.name, "supportedLocalesOf");
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.supportedLocalesOf, "name");
|
||||
verifyNotWritable(Intl.DateTimeFormat.supportedLocalesOf, "name");
|
||||
verifyConfigurable(Intl.DateTimeFormat.supportedLocalesOf, "name");
|
||||
verifyProperty(Intl.DateTimeFormat.supportedLocalesOf, "name", {
|
||||
value: "supportedLocalesOf",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -24,6 +24,8 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat, "supportedLocalesOf");
|
||||
verifyWritable(Intl.DateTimeFormat, "supportedLocalesOf");
|
||||
verifyConfigurable(Intl.DateTimeFormat, "supportedLocalesOf");
|
||||
verifyProperty(Intl.DateTimeFormat, "supportedLocalesOf", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue