anayw2001 commented on code in PR #759:
URL: https://github.com/apache/commons-compress/pull/759#discussion_r2709960221
##########
src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntryTest.java:
##########
@@ -23,9 +23,24 @@
import org.apache.commons.compress.archivers.ArchiveException;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
class CpioArchiveEntryTest {
+ @ParameterizedTest
+ @ValueSource(shorts = {CpioConstants.FORMAT_NEW,
CpioConstants.FORMAT_NEW_CRC, CpioConstants.FORMAT_OLD_BINARY})
+ void testCpioEntrySize_notOver4GiB(short format) {
+ final CpioArchiveEntry entry = new CpioArchiveEntry(format);
+ assertThrows(IllegalArgumentException.class, () ->
entry.setSize(0x1FFFFFFFFL));
+ }
+
+ @Test
+ void testCpioEntrySize_odc_over4GiB() {
Review Comment:
Renamed tests to be more clear.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]