summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/slice/return-abrupt-from-end.js
blob: 9d9f8733a3e902118c042b3eac09c299e76b9554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))

var o1 = { valueOf: function() { throw new SyntaxError(); } };
var o2 = { toString: function() { throw new SyntaxError(); } };

var sample = #[];

assertThrowsInstanceOf(() => sample.slice(0, o1),
                       SyntaxError, "valueOf throws");
assertThrowsInstanceOf(() => sample.slice(0, o2),
                       SyntaxError, "toString throws");

reportCompare(0, 0);