Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 31179 invoked from network); 3 Sep 2009 10:49:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 10:49:50 -0000 Received: (qmail 55307 invoked by uid 500); 3 Sep 2009 10:49:49 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 55208 invoked by uid 500); 3 Sep 2009 10:49:49 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 55199 invoked by uid 99); 3 Sep 2009 10:49:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 10:49:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 10:49:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BA1BE23888E5; Thu, 3 Sep 2009 10:49:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r810886 - /commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java Date: Thu, 03 Sep 2009 10:49:25 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090903104925.BA1BE23888E5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebb Date: Thu Sep 3 10:49:25 2009 New Revision: 810886 URL: http://svn.apache.org/viewvc?rev=810886&view=rev Log: Remove unused code and variables Simplify failure reporting Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java?rev=810886&r1=810885&r2=810886&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java Thu Sep 3 10:49:25 2009 @@ -277,15 +277,11 @@ "while (x) 1 if (y) 2 3" }; for (int f = 0; f < fexprs.length; ++f) { - boolean fail = true; try { - Script s = jexl.createScript(fexprs[f]); + jexl.createScript(fexprs[f]); + fail(fexprs[f] + ": Should have failed in parse"); } catch (ParseException xany) { // expected to fail in parse - fail = false; - } - if (fail) { - fail(fexprs[f] + ": Should have failed in parse"); } } // ';' is necessary between expressions and only expressions @@ -296,11 +292,11 @@ "for(z : [3, 4, 5]) { z } y ? 2 : 1", "for(z : [3, 4, 5]) { z } if (y) 2 else 1" }; - ctxt.getVars().put("x", false); - ctxt.getVars().put("y", true); + ctxt.getVars().put("x", Boolean.FALSE); + ctxt.getVars().put("y", Boolean.TRUE); for (int e = 0; e < exprs.length; ++e) { Script s = jexl.createScript(exprs[e]); - assertEquals(2, s.execute(ctxt)); + assertEquals(Integer.valueOf(2), s.execute(ctxt)); } debuggerCheck(jexl); }