Skip to content

Commit c4ea2b0

Browse files
committed
Improve branch coverage for Processor (isAarch64, isRISCV); add
ProcessorTest #1578 Remove extra vertical space
1 parent 5db0618 commit c4ea2b0

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ The <action> type attribute can be add,update,fix,remove.
105105
<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>
106106
<action type="fix" dev="ggregory" due-to="Gary Gregory, Akshat Upadhyay">Fix Javadoc parameter comments in StringUtils.truncate() methods #1536.</action>
107107
<action type="fix" dev="ggregory" due-to="Gary Gregory, Dhaneesh.M">Improve test coverage for TypeUtils.isAssignable() #1574.</action>
108+
<action type="fix" dev="ggregory" due-to="Gary Gregory, Dhaneesh.M">Improve branch coverage for Processor (isAarch64, isRISCV); add ProcessorTest #1578.</action>
108109
<!-- ADD -->
109110
<action type="add" dev="ggregory" due-to="Gary Gregory">Add JavaVersion.JAVA_27.</action>
110111
<action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemUtils.IS_JAVA_27.</action>

src/test/java/org/apache/commons/lang3/arch/ProcessorTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
1718
package org.apache.commons.lang3.arch;
1819

1920
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -29,7 +30,6 @@ public class ProcessorTest {
2930
public void testIs32Bit() {
3031
Processor processor = new Processor(Arch.BIT_32, Type.X86);
3132
assertTrue(processor.is32Bit());
32-
3333
processor = new Processor(Arch.BIT_64, Type.X86);
3434
assertFalse(processor.is32Bit());
3535
}
@@ -38,7 +38,6 @@ public void testIs32Bit() {
3838
public void testIs64Bit() {
3939
Processor processor = new Processor(Arch.BIT_64, Type.X86);
4040
assertTrue(processor.is64Bit());
41-
4241
processor = new Processor(Arch.BIT_32, Type.X86);
4342
assertFalse(processor.is64Bit());
4443
}
@@ -47,7 +46,6 @@ public void testIs64Bit() {
4746
public void testIsAarch64() {
4847
Processor processor = new Processor(Arch.BIT_64, Type.AARCH_64);
4948
assertTrue(processor.isAarch64());
50-
5149
processor = new Processor(Arch.BIT_64, Type.X86);
5250
assertFalse(processor.isAarch64());
5351
}
@@ -56,7 +54,6 @@ public void testIsAarch64() {
5654
public void testIsIA64() {
5755
Processor processor = new Processor(Arch.BIT_64, Type.IA_64);
5856
assertTrue(processor.isIA64());
59-
6057
processor = new Processor(Arch.BIT_64, Type.X86);
6158
assertFalse(processor.isIA64());
6259
}
@@ -65,7 +62,6 @@ public void testIsIA64() {
6562
public void testIsPPC() {
6663
Processor processor = new Processor(Arch.BIT_64, Type.PPC);
6764
assertTrue(processor.isPPC());
68-
6965
processor = new Processor(Arch.BIT_64, Type.X86);
7066
assertFalse(processor.isPPC());
7167
}
@@ -74,7 +70,6 @@ public void testIsPPC() {
7470
public void testIsRISCV() {
7571
Processor processor = new Processor(Arch.BIT_64, Type.RISC_V);
7672
assertTrue(processor.isRISCV());
77-
7873
processor = new Processor(Arch.BIT_64, Type.X86);
7974
assertFalse(processor.isRISCV());
8075
}
@@ -83,7 +78,6 @@ public void testIsRISCV() {
8378
public void testIsX86() {
8479
Processor processor = new Processor(Arch.BIT_32, Type.X86);
8580
assertTrue(processor.isX86());
86-
8781
processor = new Processor(Arch.BIT_64, Type.AARCH_64);
8882
assertFalse(processor.isX86());
8983
}

0 commit comments

Comments
 (0)