mirror of
https://github.com/tc39/test262.git
synced 2025-09-25 11:08:49 +02:00
Replace createNewGlobal with $262.createRealm().global in sm/Iterator
This commit is contained in:
parent
d77f35a4ec
commit
4ea90c4681
@ -29,7 +29,7 @@ const iter = {
|
||||
throw: (value) => ({done: true, value}),
|
||||
};
|
||||
const thisWrap = Iterator.from(iter);
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
const otherWrap = otherGlobal.Iterator.from(iter);
|
||||
|
||||
checkIterResult(thisWrap.next.call(otherWrap), false, 0);
|
||||
|
@ -13,7 +13,7 @@ description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
|
||||
const iter = [1, 2, 3].values();
|
||||
assert.sameValue(iter, Iterator.from(iter));
|
||||
|
@ -14,7 +14,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
assert.sameValue(TypeError !== otherGlobal.TypeError, true);
|
||||
|
||||
const iter = [].values();
|
||||
|
@ -14,7 +14,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
assert.sameValue(TypeError !== otherGlobal.TypeError, true);
|
||||
|
||||
const iter = [].values();
|
||||
|
@ -14,7 +14,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
assert.sameValue(TypeError !== otherGlobal.TypeError, true);
|
||||
|
||||
const iter = [].values();
|
||||
|
@ -31,7 +31,7 @@ function checkIterResult({done, value}, expectedDone, expectedValue) {
|
||||
assert.sameValue(Array.isArray(value) ? value[1] : value, expectedValue);
|
||||
}
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
|
||||
const methods = [
|
||||
["map", x => x],
|
||||
|
@ -12,7 +12,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherIteratorProto = createNewGlobal({newCompartment: true}).Iterator.prototype;
|
||||
const otherIteratorProto = $262.createRealm().global.Iterator.prototype;
|
||||
|
||||
const methods = [
|
||||
["map", x => x],
|
||||
|
@ -14,7 +14,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
assert.sameValue(TypeError !== otherGlobal.TypeError, true);
|
||||
|
||||
const iter = [].values();
|
||||
|
@ -14,7 +14,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
assert.sameValue(TypeError !== otherGlobal.TypeError, true);
|
||||
|
||||
const iter = [].values();
|
||||
|
@ -14,7 +14,7 @@ description: |
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
const otherGlobal = createNewGlobal({newCompartment: true});
|
||||
const otherGlobal = $262.createRealm().global;
|
||||
|
||||
let array = [1, 2, 3].values().toArray();
|
||||
assert.sameValue(array instanceof Array, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user