org.apache.commons.math.util
Class MathUtilsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.util.MathUtilsTest
All Implemented Interfaces:
junit.framework.Test

public final class MathUtilsTest
extends junit.framework.TestCase

Test cases for the MathUtils class.

Version:
$Revision: 790243 $ $Date: 2007-08-16 15:36:33 -0500 (Thu, 16 Aug 2007) $

Constructor Summary
MathUtilsTest(String name)
           
 
Method Summary
static junit.framework.Test suite()
           
 void test0Choose0()
          Verify that b(0,0) = 1
 void testAddAndCheck()
           
 void testAddAndCheckLong()
           
 void testArrayEquals()
           
 void testArrayHash()
           
 void testBinomialCoefficient()
           
 void testBinomialCoefficientFail()
           
 void testBinomialCoefficientLarge()
          Tests correctness for large n and sharpness of upper bound in API doc JIRA: MATH-241
 void testCompareTo()
           
 void testCosh()
           
 void testCoshNaN()
           
 void testEquals()
           
 void testEqualsWithAllowedDelta()
           
 void testEqualsWithAllowedUlps()
           
 void testFactorial()
           
 void testFactorialFail()
           
 void testGcd()
           
 void testHash()
           
 void testIndicatorByte()
           
 void testIndicatorDouble()
           
 void testIndicatorFloat()
           
 void testIndicatorInt()
           
 void testIndicatorLong()
           
 void testIndicatorShort()
           
 void testL1DistanceDouble()
           
 void testL1DistanceInt()
           
 void testL2DistanceDouble()
           
 void testL2DistanceInt()
           
 void testLcm()
           
 void testLInfDistanceDouble()
           
 void testLInfDistanceInt()
           
 void testLog()
           
 void testMulAndCheck()
           
 void testMulAndCheckLong()
           
 void testNextAfter()
           
 void testNextAfterSpecialCases()
           
 void testNormalizeAngle()
           
 void testPermutedArrayHash()
          Make sure that permuted arrays do not hash to the same value.
 void testPow()
           
 void testRoundDouble()
           
 void testRoundFloat()
           
 void testScalb()
           
 void testSignByte()
           
 void testSignDouble()
           
 void testSignFloat()
           
 void testSignInt()
           
 void testSignLong()
           
 void testSignShort()
           
 void testSinh()
           
 void testSinhNaN()
           
 void testSubAndCheck()
           
 void testSubAndCheckErrorMessage()
           
 void testSubAndCheckLong()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MathUtilsTest

public MathUtilsTest(String name)
Method Detail

suite

public static junit.framework.Test suite()

test0Choose0

public void test0Choose0()
Verify that b(0,0) = 1


testAddAndCheck

public void testAddAndCheck()

testAddAndCheckLong

public void testAddAndCheckLong()

testBinomialCoefficient

public void testBinomialCoefficient()

testBinomialCoefficientLarge

public void testBinomialCoefficientLarge()
                                  throws Exception
Tests correctness for large n and sharpness of upper bound in API doc JIRA: MATH-241

Throws:
Exception

testBinomialCoefficientFail

public void testBinomialCoefficientFail()

testCompareTo

public void testCompareTo()

testCosh

public void testCosh()

testCoshNaN

public void testCoshNaN()

testEquals

public void testEquals()

testEqualsWithAllowedDelta

public void testEqualsWithAllowedDelta()

testEqualsWithAllowedUlps

public void testEqualsWithAllowedUlps()

testArrayEquals

public void testArrayEquals()

testFactorial

public void testFactorial()

testFactorialFail

public void testFactorialFail()

testGcd

public void testGcd()

testHash

public void testHash()

testArrayHash

public void testArrayHash()

testPermutedArrayHash

public void testPermutedArrayHash()
Make sure that permuted arrays do not hash to the same value.


testIndicatorByte

public void testIndicatorByte()

testIndicatorDouble

public void testIndicatorDouble()

testIndicatorFloat

public void testIndicatorFloat()

testIndicatorInt

public void testIndicatorInt()

testIndicatorLong

public void testIndicatorLong()

testIndicatorShort

public void testIndicatorShort()

testLcm

public void testLcm()

testLog

public void testLog()

testMulAndCheck

public void testMulAndCheck()

testMulAndCheckLong

public void testMulAndCheckLong()

testNextAfter

public void testNextAfter()

testNextAfterSpecialCases

public void testNextAfterSpecialCases()

testScalb

public void testScalb()

testNormalizeAngle

public void testNormalizeAngle()

testRoundDouble

public void testRoundDouble()

testRoundFloat

public void testRoundFloat()

testSignByte

public void testSignByte()

testSignDouble

public void testSignDouble()

testSignFloat

public void testSignFloat()

testSignInt

public void testSignInt()

testSignLong

public void testSignLong()

testSignShort

public void testSignShort()

testSinh

public void testSinh()

testSinhNaN

public void testSinhNaN()

testSubAndCheck

public void testSubAndCheck()

testSubAndCheckErrorMessage

public void testSubAndCheckErrorMessage()

testSubAndCheckLong

public void testSubAndCheckLong()

testPow

public void testPow()

testL1DistanceDouble

public void testL1DistanceDouble()

testL1DistanceInt

public void testL1DistanceInt()

testL2DistanceDouble

public void testL2DistanceDouble()

testL2DistanceInt

public void testL2DistanceInt()

testLInfDistanceDouble

public void testLInfDistanceDouble()

testLInfDistanceInt

public void testLInfDistanceInt()


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.