Class BigDecimalTest

java.lang.Object
com.singularsys.jeptests.unit.bigdecimal.BigDecimalTest

@Tag("big-decimals") public class BigDecimalTest extends Object
Tests the BigDecComponents through a set of test expressions that are evaluated.
Author:
singularsys
  • Field Details

  • Constructor Details

    • BigDecimalTest

      public BigDecimalTest()
  • Method Details

    • unlimitedPrecisionTest

      @Test public void unlimitedPrecisionTest()
    • fixedPrecisionCreateNumber

      @Test public void fixedPrecisionCreateNumber() throws JepException
      Throws:
      JepException
    • fixedPrecisionTest

      @Test public void fixedPrecisionTest() throws JepException
      Throws:
      JepException
    • fixedPointfiniteMantissaTest

      @Test public void fixedPointfiniteMantissaTest() throws JepException
      Throws:
      JepException
    • checkFixedPrecision

      public void checkFixedPrecision(BigDecComponents bdc) throws JepException
      Throws:
      JepException
    • cmpBug

      @Test public void cmpBug()
      Check for problems where MinMax used comparisons which worked by first converting to doubles.
    • limitedPrecisionTest

      @Test public void limitedPrecisionTest()
    • power_only_works_when_argument_is_integral

      @Test public void power_only_works_when_argument_is_integral() throws JepException
      Trying to raise a big decimal to a non-integral big decimal fails as not supported by BigDecimal BigDecimal Rounding using power operator
      Throws:
      JepException - on error
    • test

      public void test(String str, boolean value)
      Test expression against boolean
    • test

      public void test(String str, String value)
    • eval

      public Object eval(String str)
    • testCP

      @Test public void testCP() throws Exception
      Throws:
      Exception
    • exprEquals

      public void exprEquals(String expr, Object expected) throws JepException
      Throws:
      JepException
    • evalExceptionTest

      public void evalExceptionTest(String expr) throws JepException
      Throws:
      JepException
    • testSetAllowStrings

      @Test public void testSetAllowStrings() throws Exception
      Throws:
      Exception
    • testBoolean

      @Test public void testBoolean() throws Exception
      Throws:
      Exception
    • testBDString

      @Test public void testBDString() throws Exception
      Tests inter-operability of big decimals and strings.
      Throws:
      Exception
    • testAbs

      @Test public void testAbs()
    • test_Round

      @Test public void test_Round()
    • test_Signum

      @Test public void test_Signum()
    • test_MinMax

      @Test public void test_MinMax()
    • test_Avg

      @Test public void test_Avg()
    • test_If

      @Test public void test_If()
    • testCoerce

      @Test public void testCoerce() throws Exception
      Throws:
      Exception
    • testVSum

      @Test public void testVSum()
    • test_list_of_BigDecimals

      @Test public void test_list_of_BigDecimals() throws JepException
      Throws:
      JepException
    • test_extracting_element_from_list_of_BigDecimals

      @Test public void test_extracting_element_from_list_of_BigDecimals() throws JepException
      Throws:
      JepException