mirror of https://github.com/tc39/test262.git
add verifyPrimordialProperty
This commit is contained in:
parent
f923513ec6
commit
d6155b6ef2
|
@ -13,6 +13,7 @@ defines:
|
|||
- verifyNotEnumerable # deprecated
|
||||
- verifyConfigurable # deprecated
|
||||
- verifyNotConfigurable # deprecated
|
||||
- verifyPrimordialProperty
|
||||
---*/
|
||||
|
||||
// @ts-check
|
||||
|
@ -280,3 +281,10 @@ function verifyNotConfigurable(obj, name) {
|
|||
throw new Test262Error("Expected obj[" + String(name) + "] NOT to be configurable, but was.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this function to verify the properties of a primordial object.
|
||||
* For non-primordial objects, use verifyProperty.
|
||||
* See: https://github.com/tc39/how-we-work/blob/main/terminology.md#primordial
|
||||
*/
|
||||
var verifyPrimordialProperty = verifyProperty;
|
||||
|
|
|
@ -9,5 +9,7 @@ class CheckHarness(Check):
|
|||
def run(self, name, meta, source):
|
||||
if 'verifyConfigurable(' in source and 'verifyProperty(' in source:
|
||||
return 'verifyConfigurable & verifyProperty may not be used in the same file'
|
||||
elif 'verifyConfigurable(' in source and 'verifyPrimordialProperty(' in source:
|
||||
return 'verifyConfigurable & verifyPrimordialProperty may not be used in the same file'
|
||||
else:
|
||||
return
|
||||
|
|
|
@ -13,6 +13,7 @@ defines:
|
|||
- verifyNotEnumerable
|
||||
- verifyConfigurable
|
||||
- verifyNotConfigurable
|
||||
- verifyPrimordialProperty
|
||||
---*/
|
||||
|
||||
// @ts-check
|
||||
|
@ -227,3 +228,10 @@ function verifyNotConfigurable(obj, name) {
|
|||
throw new Test262Error("Expected obj[" + String(name) + "] NOT to be configurable, but was.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this function to verify the properties of a primordial object.
|
||||
* For non-primordial objects, use verifyProperty.
|
||||
* See: https://github.com/tc39/how-we-work/blob/main/terminology.md#primordial
|
||||
*/
|
||||
var verifyPrimordialProperty = verifyProperty;
|
||||
|
|
Loading…
Reference in New Issue