db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5986) Make ArithmeticTest test DECIMAL data type
Date Wed, 07 Nov 2012 14:27:12 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-5986:
--------------------------------------

    Attachment: d5986-1a-decimal.diff

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.
                
> Make ArithmeticTest test DECIMAL data type
> ------------------------------------------
>
>                 Key: DERBY-5986
>                 URL: https://issues.apache.org/jira/browse/DERBY-5986
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.10.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5986-1a-decimal.diff
>
>
> I noticed in the code coverage report that the DECIMAL data type has less test coverage
than the other numeric data types. One way to improve it may be to make existing tests for
other numeric types also test the DECIMAL type. ArithmeticTest is one such test.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message