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-2382) Convert casting.java to Junit
Date Thu, 01 Mar 2007 10:42:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476885

Knut Anders Hatlen commented on DERBY-2382:

Since the old test verifies that the values are correct, I think the new one should do that
too, unless it's covered by other tests. It's kind of important that the returned value of
a cast is correct... ;)

Some minor nits:
  - tearDown() should call super.tearDown()
  - in some cases fail() is used to report an unexpected exception. I think it's better just
to (re-)throw the exception so that we preserve the stack trace.
  - some uses of fail, like
+            if (!isSupportedAssignment(sourceType,targetType))
+                fail(description + "should not succeed");
would perhaps be clearer if they were written as assertTrue(...)
  - the indentation is a bit inconsistent (some places 4 characters, but most places 8)
  - most of the "public static" methods could be "private static", I think
  - the test methods are declared as "throws SQLException, Throwable". I don't think the Throwable
is needed (but I haven't checked, so I might be wrong)

> Convert casting.java to Junit
> -----------------------------
>                 Key: DERBY-2382
>                 URL: https://issues.apache.org/jira/browse/DERBY-2382
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>    Affects Versions:
>            Reporter: Kathey Marsden
>         Assigned To: Kathey Marsden
>            Priority: Minor
>             Fix For:
>         Attachments: DERBY_2382.diff
> Convert casting.java to Junit

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message