mirror of
https://github.com/tc39/test262.git
synced 2025-07-20 12:34:41 +02:00
Use verifyProperty in language/global-code tests
This commit is contained in:
parent
8ff30c73ce
commit
e6f1feb04d
@ -41,8 +41,10 @@ includes: [propertyHelper.js]
|
|||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
typeof brandNew, 'function', 'new binding on an extensible global object'
|
typeof brandNew, 'function', 'new binding on an extensible global object'
|
||||||
);
|
);
|
||||||
verifyEnumerable(this, 'brandNew');
|
verifyProperty(this, 'brandNew', {
|
||||||
verifyWritable(this, 'brandNew');
|
writable: true,
|
||||||
verifyNotConfigurable(this, 'brandNew');
|
enumerable: true,
|
||||||
|
configurable: false,
|
||||||
|
});
|
||||||
|
|
||||||
function brandNew() {}
|
function brandNew() {}
|
||||||
|
@ -32,11 +32,11 @@ info: |
|
|||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
verifyProperty(this, "brandNew", {
|
||||||
this.brandNew, undefined, 'new binding on an extensible global object'
|
value: undefined,
|
||||||
);
|
writable: true,
|
||||||
verifyEnumerable(this, 'brandNew');
|
enumerable: true,
|
||||||
verifyWritable(this, 'brandNew');
|
configurable: false,
|
||||||
verifyNotConfigurable(this, 'brandNew');
|
});
|
||||||
|
|
||||||
var brandNew;
|
var brandNew;
|
||||||
|
@ -43,9 +43,11 @@ $262.evalScript('function brandNew() {}');
|
|||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
typeof brandNew, 'function', 'new binding on an extensible global object'
|
typeof brandNew, 'function', 'new binding on an extensible global object'
|
||||||
);
|
);
|
||||||
verifyEnumerable(this, 'brandNew');
|
verifyProperty(this, 'brandNew', {
|
||||||
verifyWritable(this, 'brandNew');
|
writable: true,
|
||||||
verifyNotConfigurable(this, 'brandNew');
|
enumerable: true,
|
||||||
|
configurable: false,
|
||||||
|
});
|
||||||
|
|
||||||
Object.defineProperty(this, 'configurable', { configurable: true, value: 0 });
|
Object.defineProperty(this, 'configurable', { configurable: true, value: 0 });
|
||||||
Object.defineProperty(
|
Object.defineProperty(
|
||||||
@ -63,9 +65,11 @@ $262.evalScript('function configurable() {}');
|
|||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
typeof configurable, 'function', 'like-named configurable property'
|
typeof configurable, 'function', 'like-named configurable property'
|
||||||
);
|
);
|
||||||
verifyEnumerable(this, 'configurable')
|
verifyProperty(this, 'configurable', {
|
||||||
verifyWritable(this, 'configurable');
|
writable: true,
|
||||||
verifyNotConfigurable(this, 'configurable');
|
enumerable: true,
|
||||||
|
configurable: false,
|
||||||
|
});
|
||||||
|
|
||||||
$262.evalScript('function nonConfigurable() {}');
|
$262.evalScript('function nonConfigurable() {}');
|
||||||
|
|
||||||
@ -74,6 +78,8 @@ assert.sameValue(
|
|||||||
'function',
|
'function',
|
||||||
'like-named non-configurable data property that is writable and enumerable'
|
'like-named non-configurable data property that is writable and enumerable'
|
||||||
);
|
);
|
||||||
verifyEnumerable(this, 'nonConfigurable');
|
verifyProperty(this, 'nonConfigurable', {
|
||||||
verifyWritable(this, 'nonConfigurable');
|
writable: true,
|
||||||
verifyNotConfigurable(this, 'nonConfigurable');
|
enumerable: true,
|
||||||
|
configurable: false,
|
||||||
|
});
|
||||||
|
@ -34,12 +34,12 @@ includes: [propertyHelper.js]
|
|||||||
|
|
||||||
$262.evalScript('var brandNew;');
|
$262.evalScript('var brandNew;');
|
||||||
|
|
||||||
assert.sameValue(
|
verifyProperty(this, 'brandNew', {
|
||||||
this.brandNew, undefined, 'new binding on an extensible global object'
|
value: undefined,
|
||||||
);
|
writable: true,
|
||||||
verifyEnumerable(this, 'brandNew');
|
enumerable: true,
|
||||||
verifyWritable(this, 'brandNew');
|
configurable: false,
|
||||||
verifyNotConfigurable(this, 'brandNew');
|
});
|
||||||
|
|
||||||
Object.defineProperty(
|
Object.defineProperty(
|
||||||
this,
|
this,
|
||||||
@ -58,14 +58,18 @@ Object.preventExtensions(this);
|
|||||||
|
|
||||||
$262.evalScript('var configurable;');
|
$262.evalScript('var configurable;');
|
||||||
|
|
||||||
assert.sameValue(configurable, 0, 'like-named configurable property');
|
verifyProperty(this, 'configurable', {
|
||||||
verifyNotEnumerable(this, 'configurable');
|
value: 0,
|
||||||
verifyNotWritable(this, 'configurable');
|
writable: false,
|
||||||
verifyConfigurable(this, 'configurable');
|
enumerable: false,
|
||||||
|
configurable: true,
|
||||||
|
});
|
||||||
|
|
||||||
$262.evalScript('var nonConfigurable;');
|
$262.evalScript('var nonConfigurable;');
|
||||||
|
|
||||||
assert.sameValue(nonConfigurable, 0, 'like-named non-configurable property');
|
verifyProperty(this, 'nonConfigurable', {
|
||||||
verifyNotEnumerable(this, 'nonConfigurable');
|
value: 0,
|
||||||
verifyNotWritable(this, 'nonConfigurable');
|
writable: false,
|
||||||
verifyNotConfigurable(this, 'nonConfigurable');
|
enumerable: false,
|
||||||
|
configurable: false,
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user