harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6608) [classlib][archive]Unit tests to improve the coverage of archive module
Date Tue, 10 Aug 2010 14:18:16 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896887#action_12896887
] 

Mark Hindess commented on HARMONY-6608:
---------------------------------------

Thanks for the patches.  I wonder about tests like:

+        try{
+            Deflater defl = new Deflater();
+            defl.setLevel(2);
+            outPutBuf = new byte[500];
+            defl.setInput(byteArray);
+            defl.setLevel(3);
+            fail("IllegalStateException expected");
+        }catch(IllegalStateException ise){
+            //expected
+        }

and whether they should really be written as:

+        Deflater defl = new Deflater();
+        defl.setLevel(2);
+        outPutBuf = new byte[500];
+        defl.setInput(byteArray);
+        try{
+            defl.setLevel(3);
+            fail("IllegalStateException expected");
+        }catch(IllegalStateException ise){
+            //expected
+        }

since it is really only the exception from the second setLevel call that should cause the
test to pass?  There are several tests in your patch that have this problem.

Also, it would be good to describe in the comments how you intend the patches to be applied.
 In particular, both patches appear to be valid for java5 except for the DeflaterInputStreamTest
which is java6 only.  Perhaps it would be better to supply separate patches for the tests
that are for java5 trunk and those that are only applicable to the java6 branch?


> [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.


Mime
View raw message