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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new c4ea2b011 Improve branch coverage for Processor (isAarch64, isRISCV);
add ProcessorTest #1578
c4ea2b011 is described below
commit c4ea2b0113b28b9d861acefc296f277e2eddaf9f
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jan 22 10:45:35 2026 -0500
Improve branch coverage for Processor (isAarch64, isRISCV); add
ProcessorTest #1578
Remove extra vertical space
---
src/changes/changes.xml | 1 +
src/test/java/org/apache/commons/lang3/arch/ProcessorTest.java | 8 +-------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 824cfba27..4579592d8 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -105,6 +105,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary
Gregory">RandomStringUtils.random() methods may not return when asked to
generate only letters or only numbers while provided with a range that contains
neither.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory,
Akshat Upadhyay">Fix Javadoc parameter comments in StringUtils.truncate()
methods #1536.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory,
Dhaneesh.M">Improve test coverage for TypeUtils.isAssignable() #1574.</action>
+ <action type="fix" dev="ggregory" due-to="Gary Gregory,
Dhaneesh.M">Improve branch coverage for Processor (isAarch64, isRISCV); add
ProcessorTest #1578.</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary
Gregory">Add JavaVersion.JAVA_27.</action>
<action type="add" dev="ggregory" due-to="Gary
Gregory">Add SystemUtils.IS_JAVA_27.</action>
diff --git a/src/test/java/org/apache/commons/lang3/arch/ProcessorTest.java
b/src/test/java/org/apache/commons/lang3/arch/ProcessorTest.java
index d811bb70c..171903ea3 100644
--- a/src/test/java/org/apache/commons/lang3/arch/ProcessorTest.java
+++ b/src/test/java/org/apache/commons/lang3/arch/ProcessorTest.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.commons.lang3.arch;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -29,7 +30,6 @@ public class ProcessorTest {
public void testIs32Bit() {
Processor processor = new Processor(Arch.BIT_32, Type.X86);
assertTrue(processor.is32Bit());
-
processor = new Processor(Arch.BIT_64, Type.X86);
assertFalse(processor.is32Bit());
}
@@ -38,7 +38,6 @@ public void testIs32Bit() {
public void testIs64Bit() {
Processor processor = new Processor(Arch.BIT_64, Type.X86);
assertTrue(processor.is64Bit());
-
processor = new Processor(Arch.BIT_32, Type.X86);
assertFalse(processor.is64Bit());
}
@@ -47,7 +46,6 @@ public void testIs64Bit() {
public void testIsAarch64() {
Processor processor = new Processor(Arch.BIT_64, Type.AARCH_64);
assertTrue(processor.isAarch64());
-
processor = new Processor(Arch.BIT_64, Type.X86);
assertFalse(processor.isAarch64());
}
@@ -56,7 +54,6 @@ public void testIsAarch64() {
public void testIsIA64() {
Processor processor = new Processor(Arch.BIT_64, Type.IA_64);
assertTrue(processor.isIA64());
-
processor = new Processor(Arch.BIT_64, Type.X86);
assertFalse(processor.isIA64());
}
@@ -65,7 +62,6 @@ public void testIsIA64() {
public void testIsPPC() {
Processor processor = new Processor(Arch.BIT_64, Type.PPC);
assertTrue(processor.isPPC());
-
processor = new Processor(Arch.BIT_64, Type.X86);
assertFalse(processor.isPPC());
}
@@ -74,7 +70,6 @@ public void testIsPPC() {
public void testIsRISCV() {
Processor processor = new Processor(Arch.BIT_64, Type.RISC_V);
assertTrue(processor.isRISCV());
-
processor = new Processor(Arch.BIT_64, Type.X86);
assertFalse(processor.isRISCV());
}
@@ -83,7 +78,6 @@ public void testIsRISCV() {
public void testIsX86() {
Processor processor = new Processor(Arch.BIT_32, Type.X86);
assertTrue(processor.isX86());
-
processor = new Processor(Arch.BIT_64, Type.AARCH_64);
assertFalse(processor.isX86());
}