blob: 4442b0d3d5389be34cdcf5d88ab8c9d102ae6fbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
let sample = #[42, 43, 44, 45, 46];
var calls = 0;
let comparefn = function() {
calls += 1;
throw new TypeError();
};
assertThrowsInstanceOf(function() {
sample.toSorted(comparefn);
}, TypeError, "comparefn should throw");
assertEq(calls, 1);
reportCompare(0, 0);
|