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 5180A8894 for ; Mon, 5 Sep 2011 14:04:40 +0000 (UTC) Received: (qmail 55942 invoked by uid 500); 5 Sep 2011 14:04:39 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 55761 invoked by uid 500); 5 Sep 2011 14:04:38 -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 55754 invoked by uid 99); 5 Sep 2011 14:04:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2011 14:04:38 +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; Mon, 05 Sep 2011 14:04:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A3E9E23889B3 for ; Mon, 5 Sep 2011 14:04:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1165287 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java Date: Mon, 05 Sep 2011 14:04:16 -0000 To: commits@commons.apache.org From: erans@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110905140416.A3E9E23889B3@eris.apache.org> Author: erans Date: Mon Sep 5 14:04:16 2011 New Revision: 1165287 URL: http://svn.apache.org/viewvc?rev=1165287&view=rev Log: Separating test cases. Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java?rev=1165287&r1=1165286&r2=1165287&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java Mon Sep 5 14:04:16 2011 @@ -229,6 +229,14 @@ public class ComplexTest { public void testDivideZero() { Complex x = new Complex(3.0, 4.0); Complex z = x.divide(Complex.ZERO); + // Assert.assertEquals(z, Complex.INF); // See MATH-657 + Assert.assertEquals(z, Complex.NaN); + } + + @Test + public void testDivideZeroZero() { + Complex x = new Complex(0.0, 0.0); + Complex z = x.divide(Complex.ZERO); Assert.assertEquals(z, Complex.NaN); } @@ -349,13 +357,13 @@ public class ComplexTest { @Test public void testScalarMultiplyInf() { - Complex x = new Complex(1,1); + Complex x = new Complex(1, 1); double yDouble = Double.POSITIVE_INFINITY; Complex yComplex = new Complex(yDouble); Assert.assertEquals(x.multiply(yComplex), x.multiply(yDouble)); yDouble = Double.NEGATIVE_INFINITY; - yComplex = new Complex(yDouble); + yComplex = new Complex(yDouble); Assert.assertEquals(x.multiply(yComplex), x.multiply(yDouble)); } @@ -565,9 +573,13 @@ public class ComplexTest { } @Test + public void testAtanI() { + Assert.assertTrue(Complex.I.atan().isNaN()); + } + + @Test public void testAtanNaN() { Assert.assertTrue(Complex.NaN.atan().isNaN()); - Assert.assertTrue(Complex.I.atan().isNaN()); } @Test