blob: c48db001b005885285b9614b07f01e3028122c0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
var closeCount = 0;
var mapFn = function() {
throw new RangeError();
};
var items = {};
items[Symbol.iterator] = function() {
return {
return: function() {
closeCount += 1;
},
next: function() {
return {
done: false
};
}
};
};
assertThrowsInstanceOf(function() {
Tuple.from(items, mapFn);
}, RangeError, 'Tuple.from(items, mapFn) should throw');
assertEq(closeCount, 1);
reportCompare(0, 0);
|