Skip to content

Commit c506dbf

Browse files
committed
Fixed linter errors in test file
1 parent 86890f7 commit c506dbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/thealgorithms/searches/SentinelLinearSearchTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void testSentinelLinearSearchLargeArrayNotFound() {
134134
void testSentinelLinearSearchRandomArray() {
135135
SentinelLinearSearch sentinelLinearSearch = new SentinelLinearSearch();
136136
Random random = new Random();
137-
Integer[] array = random.ints(0, 1000).distinct().limit(1000).boxed().toArray(Integer[]::new);
137+
Integer[] array = random.ints(0, 1000).distinct().limit(1000).boxed().toArray(Integer[] ::new);
138138
Integer key = array[random.nextInt(array.length)]; // Key should be in the array
139139
assertEquals(java.util.Arrays.asList(array).indexOf(key), sentinelLinearSearch.find(array, key), "The index of the found element should match.");
140140
}
@@ -222,4 +222,4 @@ void testSentinelLinearSearchKeyEqualsLastElement() {
222222
Integer key = 3; // Key equals last element
223223
assertEquals(2, sentinelLinearSearch.find(array, key), "Should find the first occurrence at index 2, not the last.");
224224
}
225-
}
225+
}

0 commit comments

Comments
 (0)