Skip to content

Commit 5e67220

Browse files
committed
Fix formatting in ArrayRotation tests
1 parent 2eb72d9 commit 5e67220

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/test/java/com/thealgorithms/others/ArrayRotationTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,36 @@ void shouldRotateArrayRightByTwoPositions() {
1212

1313
ArrayRotation.rotateRight(values, 2);
1414

15-
assertArrayEquals(new int[] { 4, 5, 1, 2, 3 }, values);
15+
assertArrayEquals(new int[] {4, 5, 1, 2, 3}, values);
1616

1717
}
1818

1919
@Test
2020
void shouldRotateArrayLeftByTwoPositions() {
21-
int[] values = { 1, 2, 3, 4, 5 };
21+
int[] values = {1, 2, 3, 4, 5};
2222

2323
ArrayRotation.rotateLeft(values, 2);
2424

25-
assertArrayEquals(new int[] { 3, 4, 5, 1, 2 }, values);
25+
assertArrayEquals(new int[] {3, 4, 5, 1, 2}, values);
2626

2727
}
2828

2929
@Test
3030
void shouldHandleRotationGreaterThanArrayLength() {
31-
int[] values = { 10, 20, 30, 40 };
31+
int[] values = {10, 20, 30, 40};
3232

3333
ArrayRotation.rotateRight(values, 2);
3434

35-
assertArrayEquals(new int[] { 30, 40, 10, 20 }, values);
35+
assertArrayEquals(new int[] {30, 40, 10, 20}, values);
3636
}
3737

3838
@Test
3939
void shouldKeepSingleElementArrayUnchanged() {
40-
int[] values = { 99 };
40+
int[] values = {99};
4141

4242
ArrayRotation.rotateLeft(values, 5);
4343

44-
assertArrayEquals(new int[] { 99 }, values);
44+
assertArrayEquals(new int[] {99}, values);
4545
}
4646

4747
@Test
@@ -59,6 +59,7 @@ void shouldReturnOriginalArrayWhenRotationIsZero() {
5959

6060
ArrayRotation.rotateLeft(values, 0);
6161

62-
assertArrayEquals(new int[] { 7, 8, 9 }, values);
62+
assertArrayEquals(new int[] {7, 8, 9}, values);
6363
}
6464
}
65+

0 commit comments

Comments
 (0)