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-bcel.git
The following commit(s) were added to refs/heads/master by this push: new 96fe4f95 Use better JUnit API new 9e4e369e Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-bcel.git 96fe4f95 is described below commit 96fe4f95e886a8ff3022b064211c8372f61152ff Author: Gary David Gregory (Code signing key) <ggreg...@apache.org> AuthorDate: Fri Mar 22 16:27:19 2024 -0400 Use better JUnit API --- src/test/java/org/apache/bcel/classfile/UtilityTestCase.java | 3 ++- src/test/java/org/apache/bcel/generic/TypeTestCase.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java b/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java index 8c3144b6..d747e307 100644 --- a/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java +++ b/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java @@ -20,6 +20,7 @@ package org.apache.bcel.classfile; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; @@ -105,7 +106,7 @@ public class UtilityTestCase { @Test public void testPrintArray() { - assertEquals(null, Utility.printArray(null, false, false)); + assertNull(Utility.printArray(null, false, false)); assertEquals("", Utility.printArray(new Object[0], false, false)); assertEquals("{}", Utility.printArray(new Object[0], true, false)); assertEquals("null", Utility.printArray(new Object[]{null}, false, false)); diff --git a/src/test/java/org/apache/bcel/generic/TypeTestCase.java b/src/test/java/org/apache/bcel/generic/TypeTestCase.java index 303a75ba..043ed2d6 100644 --- a/src/test/java/org/apache/bcel/generic/TypeTestCase.java +++ b/src/test/java/org/apache/bcel/generic/TypeTestCase.java @@ -18,6 +18,7 @@ package org.apache.bcel.generic; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import org.apache.bcel.Repository; import org.apache.bcel.classfile.Code; @@ -41,7 +42,7 @@ public class TypeTestCase { @Test public void testInternalTypeNametoSignature() { - assertEquals(null, Type.internalTypeNameToSignature(null)); + assertNull(Type.internalTypeNameToSignature(null)); assertEquals("", Type.internalTypeNameToSignature("")); assertEquals("TT;", Type.internalTypeNameToSignature("TT;")); assertEquals("Ljava/lang/String;", Type.internalTypeNameToSignature("Ljava/lang/String;"));