Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 29603 invoked from network); 10 Aug 2010 14:57:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Aug 2010 14:57:39 -0000 Received: (qmail 27559 invoked by uid 500); 10 Aug 2010 14:57:39 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 27465 invoked by uid 500); 10 Aug 2010 14:57:38 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 27458 invoked by uid 99); 10 Aug 2010 14:57:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 14:57:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 14:57:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7AEvFC7026735 for ; Tue, 10 Aug 2010 14:57:16 GMT Message-ID: <4779750.254041281452235967.JavaMail.jira@thor> Date: Tue, 10 Aug 2010 10:57:15 -0400 (EDT) From: "Mark Hindess (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6608) [classlib][archive]Unit tests to improve the coverage of archive module In-Reply-To: <5633535.194151281072738340.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HARMONY-6608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896900#action_12896900 ] Mark Hindess commented on HARMONY-6608: --------------------------------------- Also, tests like: + /** + * @tests java.util.jar.JarException#JarException(java.lang.String) + */ + public void test_ConstructorLjava_lang_String1() throws Exception { + try { + throw new JarException("Jar Exception"); + } catch (JarException e) { + assertEquals("Jar Exception", e.getMessage()); + } + } + + /** + * @tests java.util.jar.JarException#JarException() + */ + public void test_Constructor_void() throws Exception { + try { + throw new JarException(); + } catch (JarException e) { + // Correct + } + } should probably just be written: + /** + * @tests java.util.jar.JarException#JarException(java.lang.String) + */ + public void test_ConstructorLjava_lang_String1() throws Exception { + assertEquals("Jar Exception", new JarException("Jar Exception").getMessage()); + } + + /** + * @tests java.util.jar.JarException#JarException() + */ + public void test_Constructor_void() throws Exception { + new JarException(); + } since try/catch is already exercised sufficiently by other tests. Having said that, I'd question the value of these tests since the implementations of the tested constructors are only calls to super(...). If I was working on improving test coverage then I suspect these would be very low on my list of priorities since they seem rather unlikely to fail. > [classlib][archive]Unit tests to improve the coverage of archive module > ----------------------------------------------------------------------- > > Key: HARMONY-6608 > URL: https://issues.apache.org/jira/browse/HARMONY-6608 > Project: Harmony > Issue Type: Test > Components: Classlib > Environment: Linux and Windows > Reporter: Mohanraj Loganathan > Fix For: 6.0M3 > > Attachments: 001_HARMONY-6608.patch, 002_HARMONY-6608.patch > > > Added units-tests which increases the test-coverage of archive module. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.