mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
style: enable NeedBraces in checkstyle (#5227)
* enable style NeedBraces * style: enable NeedBraces in checkstyle --------- Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
This commit is contained in:
committed by
GitHub
parent
51fcc66345
commit
87b17e0571
@@ -8,7 +8,9 @@ class LinkedQueueTest {
|
||||
@Test
|
||||
public void testQue() {
|
||||
LinkedQueue<Integer> queue = new LinkedQueue<>();
|
||||
for (int i = 1; i < 5; i++) queue.enqueue(i);
|
||||
for (int i = 1; i < 5; i++) {
|
||||
queue.enqueue(i);
|
||||
}
|
||||
|
||||
assertEquals(queue.peekRear(), 4);
|
||||
assertEquals(queue.peek(2), 2);
|
||||
@@ -20,7 +22,9 @@ class LinkedQueueTest {
|
||||
// iterates over all the elements present
|
||||
// as in the form of nodes
|
||||
queue.forEach(integer -> {
|
||||
if (element[0]++ != integer) throw new AssertionError();
|
||||
if (element[0]++ != integer) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user