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

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


The following commit(s) were added to refs/heads/master by this push:
     new b9a90223 Fix broken tests.
b9a90223 is described below

commit b9a902234f0ce3d79907999418e5504f2f603250
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Thu May 5 15:41:59 2022 -0400

    Fix broken tests.
---
 .../java/org/apache/commons/compress/utils/BitInputStreamTest.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java 
b/src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java
index 582a16fe..6ef4ec03 100644
--- a/src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/BitInputStreamTest.java
@@ -19,6 +19,7 @@
 package org.apache.commons.compress.utils;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -31,14 +32,14 @@ public class BitInputStreamTest {
     @Test
     public void shouldNotAllowReadingOfANegativeAmountOfBits() throws 
IOException {
         try (final BitInputStream bis = new BitInputStream(getStream(), 
ByteOrder.LITTLE_ENDIAN)) {
-            bis.readBits(-1);
+            assertThrows(IOException.class, () -> bis.readBits(-1));
         }
     }
 
     @Test
     public void shouldNotAllowReadingOfMoreThan63BitsAtATime() throws 
IOException {
         try (final BitInputStream bis = new BitInputStream(getStream(), 
ByteOrder.LITTLE_ENDIAN)) {
-            bis.readBits(64);
+            assertThrows(IOException.class, () -> bis.readBits(64));
         }
     }
 

Reply via email to