Attaching a patch that makes ArithmeticTest test the DECIMAL data type.
Most of the test cases worked on DECIMAL with no changes. What needed to be changed was:
- Assumptions that the negative boundary for numeric data types was -positiveBoundary-1. For DECIMAL, the range of legal values is symmetric around zero.
- Canons that asserted results were always integers. With DECIMAL, the results of divisions could have a fraction part.
- Needed to use BigDecimal to represent and test boundary values, as the DECIMAL type supports values outside the Java long range.