This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit 5fd647066654057b59d067e741efff2de4cfb05a
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Jul 31 10:28:38 2026 -0400

    @ParameterizedTest in SevenZPackedStreamCountTest
---
 .../archivers/sevenz/SevenZPackedStreamCountTest.java | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZPackedStreamCountTest.java
 
b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZPackedStreamCountTest.java
index 294797244..b3c0278dc 100644
--- 
a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZPackedStreamCountTest.java
+++ 
b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZPackedStreamCountTest.java
@@ -33,7 +33,8 @@
 import org.apache.commons.compress.archivers.ArchiveException;
 import org.apache.commons.io.channels.ByteArraySeekableByteChannel;
 import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
-import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
 
 /**
  * Tests the number of packed streams the folders of an archive consume 
against the number of packed streams the header declares.
@@ -117,16 +118,18 @@ static void writeRepeat(final int value, final int 
numPackStreams, final Unsynch
         }
     }
 
-    @Test
-    void testFoldersConsumingMorePackedStreamsThanDeclared() {
+    @ParameterizedTest
+    @ValueSource(ints = {0, 1, 2, 4, 8, 16})
+    void testFoldersConsumingMorePackedStreamsThanDeclared(final int count) {
         // the second folder maps to a packed stream index the header never 
declared
-        assertThrows(ArchiveException.class, () -> open(1, 2).close());
+        assertThrows(ArchiveException.class, () -> open(count, count + 
1).close());
     }
 
-    @Test
-    void testMatchingPackedStreamCount() throws IOException {
-        try (SevenZFile sevenZFile = open(2, 2)) {
-            for (int i = 0; i < 2; i++) {
+    @ParameterizedTest
+    @ValueSource(ints = {0, 1, 2, 4, 8, 16})
+    void testMatchingPackedStreamCount(final int count) throws IOException {
+        try (SevenZFile sevenZFile = open(count, count)) {
+            for (int i = 0; i < count; i++) {
                 final SevenZArchiveEntry entry = sevenZFile.getNextEntry();
                 assertNotNull(entry);
                 assertEquals(String.valueOf((char) ('a' + i)), 
entry.getName());

Reply via email to