michael@0: michael@0: var config = getBuildConfiguration(); michael@0: michael@0: // FIXME: ASAN and debug builds run this too slowly for now. Re-enable michael@0: // after bug 919948 lands. michael@0: if (!config.debug && !config.asan) { michael@0: let a = []; michael@0: a.length = getMaxArgs() + 1; michael@0: michael@0: let f = function() { michael@0: }; michael@0: michael@0: try { michael@0: f(...a); michael@0: } catch (e) { michael@0: assertEq(e.message, "too many function arguments"); michael@0: } michael@0: michael@0: try { michael@0: new f(...a); michael@0: } catch (e) { michael@0: assertEq(e.message, "too many constructor arguments"); michael@0: } michael@0: michael@0: try { michael@0: eval(...a); michael@0: } catch (e) { michael@0: assertEq(e.message, "too many function arguments"); michael@0: } michael@0: }