mirror of
https://github.com/tc39/test262.git
synced 2025-07-03 04:04:42 +02:00
add verifyPrimordialProperty
This commit is contained in:
parent
f923513ec6
commit
d6155b6ef2
@ -13,6 +13,7 @@ defines:
|
|||||||
- verifyNotEnumerable # deprecated
|
- verifyNotEnumerable # deprecated
|
||||||
- verifyConfigurable # deprecated
|
- verifyConfigurable # deprecated
|
||||||
- verifyNotConfigurable # deprecated
|
- verifyNotConfigurable # deprecated
|
||||||
|
- verifyPrimordialProperty
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
@ -280,3 +281,10 @@ function verifyNotConfigurable(obj, name) {
|
|||||||
throw new Test262Error("Expected obj[" + String(name) + "] NOT to be configurable, but was.");
|
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):
|
def run(self, name, meta, source):
|
||||||
if 'verifyConfigurable(' in source and 'verifyProperty(' in source:
|
if 'verifyConfigurable(' in source and 'verifyProperty(' in source:
|
||||||
return 'verifyConfigurable & verifyProperty may not be used in the same file'
|
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:
|
else:
|
||||||
return
|
return
|
||||||
|
@ -13,6 +13,7 @@ defines:
|
|||||||
- verifyNotEnumerable
|
- verifyNotEnumerable
|
||||||
- verifyConfigurable
|
- verifyConfigurable
|
||||||
- verifyNotConfigurable
|
- verifyNotConfigurable
|
||||||
|
- verifyPrimordialProperty
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
@ -227,3 +228,10 @@ function verifyNotConfigurable(obj, name) {
|
|||||||
throw new Test262Error("Expected obj[" + String(name) + "] NOT to be configurable, but was.");
|
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…
x
Reference in New Issue
Block a user