From 3bcea483a75b8c75f68a286ff191c662055726f2 Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Fri, 14 Nov 2014 11:30:12 +0100 Subject: [PATCH] Remove arguments arity check in mjsunit because it vastly slows down the tests. R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/724133004 Cr-Commit-Position: refs/heads/master@{#25353} --- test/mjsunit/mjsunit.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js index 0430279..b360425 100644 --- a/test/mjsunit/mjsunit.js +++ b/test/mjsunit/mjsunit.js @@ -231,16 +231,7 @@ var assertUnoptimized; return deepObjectEquals(a, b); } - function checkArity(args, arity, name) { - if (args.length < arity) { - fail(PrettyPrint(arity), args.length, - name + " requires " + arity + " or more arguments"); - } - } - assertSame = function assertSame(expected, found, name_opt) { - checkArity(arguments, 2, "assertSame"); - // TODO(mstarzinger): We should think about using Harmony's egal operator // or the function equivalent Object.is() here. if (found === expected) { @@ -253,8 +244,6 @@ var assertUnoptimized; assertEquals = function assertEquals(expected, found, name_opt) { - checkArity(arguments, 2, "assertEquals"); - if (!deepEquals(found, expected)) { fail(PrettyPrint(expected), found, name_opt); } -- 2.7.4