Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FE8F7FD3 for ; Thu, 1 Dec 2011 15:23:15 +0000 (UTC) Received: (qmail 16666 invoked by uid 500); 1 Dec 2011 15:23:15 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 16610 invoked by uid 500); 1 Dec 2011 15:23:14 -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 16603 invoked by uid 99); 1 Dec 2011 15:23:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 15:23:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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, 01 Dec 2011 15:23:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7256123889ED for ; Thu, 1 Dec 2011 15:22:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1209118 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java Date: Thu, 01 Dec 2011 15:22:51 -0000 To: commits@commons.apache.org From: erans@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111201152251.7256123889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: erans Date: Thu Dec 1 15:22:50 2011 New Revision: 1209118 URL: http://svn.apache.org/viewvc?rev=1209118&view=rev Log: MATH-690 [I forgot to commit those modified tests as part of r1209100.] Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java?rev=1209118&r1=1209117&r2=1209118&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java Thu Dec 1 15:22:50 2011 @@ -209,30 +209,30 @@ public final class MathUtilsTest { @Test public void testSignByte() { - Assert.assertEquals((byte) 1, MathUtils.sign((byte) 2)); - Assert.assertEquals((byte) 0, MathUtils.sign((byte) 0)); - Assert.assertEquals((byte) (-1), MathUtils.sign((byte) (-2))); + final byte one = (byte) 1; + Assert.assertEquals((byte) 1, MathUtils.copySign(one, (byte) 2)); + Assert.assertEquals((byte) (-1), MathUtils.copySign(one, (byte) (-2))); } @Test public void testSignInt() { - Assert.assertEquals(1, MathUtils.sign(2)); - Assert.assertEquals(0, MathUtils.sign(0)); - Assert.assertEquals((-1), MathUtils.sign((-2))); + final int one = 1; + Assert.assertEquals(1, MathUtils.copySign(one, 2)); + Assert.assertEquals((-1), MathUtils.copySign(one, -2)); } @Test public void testSignLong() { - Assert.assertEquals(1L, MathUtils.sign(2L)); - Assert.assertEquals(0L, MathUtils.sign(0L)); - Assert.assertEquals(-1L, MathUtils.sign(-2L)); + final long one = 1L; + Assert.assertEquals(1L, MathUtils.copySign(one, 2L)); + Assert.assertEquals(-1L, MathUtils.copySign(one, -2L)); } @Test public void testSignShort() { - Assert.assertEquals((short) 1, MathUtils.sign((short) 2)); - Assert.assertEquals((short) 0, MathUtils.sign((short) 0)); - Assert.assertEquals((short) (-1), MathUtils.sign((short) (-2))); + final short one = (short) 1; + Assert.assertEquals((short) 1, MathUtils.copySign(one, (short) 2)); + Assert.assertEquals((short) (-1), MathUtils.copySign(one, (short) (-2))); } @Test