summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/maxConvertAllArgs.js
blob: 9fd919840455235433344fa014b4da5fc31031f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
//Bug 818620

load(libdir + "asserts.js");

assertThrowsInstanceOf(function () {
    Math.max(NaN, { valueOf: function () { throw new Error() } });
}, Error);

assertThrowsInstanceOf(function () {
    Math.min(NaN, { valueOf: function () { throw new Error() } });
}, Error);