mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 08:24:23 +02:00
chore: migrate $ERROR -> throw new Test262Error in test/intl402 (#3094)
This commit is contained in:
parent
d558af3ac0
commit
805e081783
@ -15,11 +15,11 @@ testWithIntlConstructors(function (Constructor) {
|
|||||||
obj = new Constructor();
|
obj = new Constructor();
|
||||||
newObj = Intl.DateTimeFormat.call(obj);
|
newObj = Intl.DateTimeFormat.call(obj);
|
||||||
if (obj !== newObj) {
|
if (obj !== newObj) {
|
||||||
$ERROR("Should have modified existing object.");
|
throw new Test262Error("Should have modified existing object.");
|
||||||
}
|
}
|
||||||
var key = Object.getOwnPropertySymbols(newObj)[0];
|
var key = Object.getOwnPropertySymbols(newObj)[0];
|
||||||
if (!(newObj[key] instanceof Intl.DateTimeFormat)) {
|
if (!(newObj[key] instanceof Intl.DateTimeFormat)) {
|
||||||
$ERROR("Should have installed a DateTimeFormat instance.");
|
throw new Test262Error("Should have installed a DateTimeFormat instance.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ testWithIntlConstructors(function (Constructor) {
|
|||||||
obj = new Constructor();
|
obj = new Constructor();
|
||||||
newObj = Intl.DateTimeFormat.call(obj);
|
newObj = Intl.DateTimeFormat.call(obj);
|
||||||
if (obj === newObj) {
|
if (obj === newObj) {
|
||||||
$ERROR("DateTimeFormat object created with \"new\" was not ignored as this-value.");
|
throw new Test262Error("DateTimeFormat object created with \"new\" was not ignored as this-value.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user