Class BigDecimalTest
java.lang.Object
com.singularsys.jeptests.unit.bigdecimal.BigDecimalTest
Tests the BigDecComponents through a set of test expressions that are evaluated.
- Author:
- singularsys
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcmpBug()Check for problems where MinMax used comparisons which worked by first converting to doubles.voidevalExceptionTest(String expr) voidexprEquals(String expr, Object expected) voidvoidvoidvoidvoidTrying to raise a big decimal to a non-integral big decimal fails as not supported by BigDecimal BigDecimal Rounding using power operatorvoidTest expression against booleanvoidvoidtest_Avg()voidvoidtest_If()voidvoidvoidvoidvoidtestAbs()voidTests inter-operability of big decimals and strings.voidvoidvoidtestCP()voidvoidtestVSum()void
-
Field Details
-
PRINT_RESULTS
public static final boolean PRINT_RESULTS
-
-
Constructor Details
-
BigDecimalTest
public BigDecimalTest()
-
-
Method Details
-
unlimitedPrecisionTest
@Test public void unlimitedPrecisionTest() -
fixedPrecisionCreateNumber
- Throws:
JepException
-
fixedPrecisionTest
- Throws:
JepException
-
fixedPointfiniteMantissaTest
- Throws:
JepException
-
checkFixedPrecision
- 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
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
Test expression against boolean -
test
-
eval
-
testCP
- Throws:
Exception
-
exprEquals
- Throws:
JepException
-
evalExceptionTest
- Throws:
JepException
-
testSetAllowStrings
- Throws:
Exception
-
testBoolean
- Throws:
Exception
-
testBDString
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
- Throws:
Exception
-
testVSum
@Test public void testVSum() -
test_list_of_BigDecimals
- Throws:
JepException
-
test_extracting_element_from_list_of_BigDecimals
- Throws:
JepException
-