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] [Commented] (DERBY-5971) Improve test coverage for SQLBoolean class
Date Wed, 31 Oct 2012 15:57:12 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487883#comment-13487883

Knut Anders Hatlen commented on DERBY-5971:

Since we have coverage for readExternalFromArray(), implementing DERBY-2920 would help us
get coverage for readExternal(). That issue suggests adding a default readExternalFromArray()
method that calls the readExternal() method for the common case where there's no specialized
logic in readExternalFromArray(). Otherwise, testing readExternal() could be done by merge-sorting
a large table with boolean columns, but I'd prefer a test case that didn't have to populate
a big table, if someone has other ideas.

The hashCode() method could be tested by running SELECT DISTINCT on a boolean column with
no unique index, I think.
> Improve test coverage for SQLBoolean class
> ------------------------------------------
>                 Key: DERBY-5971
>                 URL: https://issues.apache.org/jira/browse/DERBY-5971
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5971-1a-unused-and-binary-operators.diff
> When looking at a test coverage report, I noticed that these methods in the SQLBoolean
class are not tested:
> - falseTruthValue
> - trueTruthValue
> - greaterOrEquals
> - greaterThan
> - lessOrEquals
> - lessThan
> - is
> - isNot
> - readExternal
> - hashCode
> falseTruthValue() and trueTruthValue() are never called anywhere in the code and could
be removed.
> is() and isNot() also have no callers. However, they implement the boolean IS operator
which is part of the SQL standard, so it might make more sense to file a JIRA to add the syntax
to the grammar rather than removing the methods.

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

View raw message