Package edu.jas.arith

Class BigDecimalTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class BigDecimalTest
    extends junit.framework.TestCase
    BigDecimal tests with JUnit.
    Author:
    Heinz Kredel
    • Constructor Summary

      Constructors 
      Constructor Description
      BigDecimalTest​(java.lang.String name)
      Constructs a BigDecimalTest object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      main.
      protected void setUp()  
      static junit.framework.Test suite()  
      protected void tearDown()  
      void testAddition()
      Test addition.
      void testBitLength()
      Test bitLength.
      void testConstants()
      Test static initialization and constants.
      void testConstructor()
      Test constructor and toString.
      void testDistributive()
      Test distributive law.
      void testMultiplication()
      Test multiplication.
      void testRandom()
      Test random rationals.
      • Methods inherited from class junit.framework.TestCase

        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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BigDecimalTest

        public BigDecimalTest​(java.lang.String name)
        Constructs a BigDecimalTest object.
        Parameters:
        name - String.
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        main.
      • suite

        public static junit.framework.Test suite()
      • setUp

        protected void setUp()
        Overrides:
        setUp in class junit.framework.TestCase
      • tearDown

        protected void tearDown()
        Overrides:
        tearDown in class junit.framework.TestCase
      • testConstants

        public void testConstants()
        Test static initialization and constants.
      • testConstructor

        public void testConstructor()
        Test constructor and toString.
      • testRandom

        public void testRandom()
        Test random rationals.
      • testMultiplication

        public void testMultiplication()
        Test multiplication. Is not associative.
      • testDistributive

        public void testDistributive()
        Test distributive law. Does not hold.