blob: 5e76f9d92103f853f6c36cd6e0c36d05a0a2bce5 [file] [log] [blame]
function test() {
var obj = { foo: 1, bar: 2 };
var iterator = Reflect.enumerate(obj);
var passed = 1;
if (typeof Symbol === 'function' && 'iterator' in Symbol) {
passed &= Symbol.iterator in iterator;
}
var item = iterator.next();
passed &= item.value === "foo" && item.done === false;
item = iterator.next();
passed &= item.value === "bar" && item.done === false;
item = iterator.next();
passed &= item.value === undefined && item.done === true;
return passed === 1;
}
if (!test())
throw new Error("Test failed");