mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
General performance improvement (#6078)
This commit is contained in:
committed by
GitHub
parent
7b962a4a1d
commit
df0c997e4b
@@ -1,5 +1,6 @@
|
||||
package com.thealgorithms.scheduling.diskscheduling;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -31,8 +32,8 @@ public class CircularLookSchedulingTest {
|
||||
@Test
|
||||
public void testCircularLookSchedulingEmptyRequests() {
|
||||
CircularLookScheduling scheduling = new CircularLookScheduling(50, true, 200);
|
||||
List<Integer> requests = Arrays.asList();
|
||||
List<Integer> expected = Arrays.asList();
|
||||
List<Integer> requests = emptyList();
|
||||
List<Integer> expected = emptyList();
|
||||
|
||||
List<Integer> result = scheduling.execute(requests);
|
||||
assertEquals(expected, result);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.thealgorithms.scheduling.diskscheduling;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -39,8 +40,8 @@ public class CircularScanSchedulingTest {
|
||||
@Test
|
||||
public void testCircularScanSchedulingEmptyRequests() {
|
||||
CircularScanScheduling circularScan = new CircularScanScheduling(50, true, 200);
|
||||
List<Integer> requests = Arrays.asList();
|
||||
List<Integer> expectedOrder = Arrays.asList();
|
||||
List<Integer> requests = emptyList();
|
||||
List<Integer> expectedOrder = emptyList();
|
||||
|
||||
List<Integer> result = circularScan.execute(requests);
|
||||
assertEquals(expectedOrder, result);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.thealgorithms.scheduling.diskscheduling;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -31,8 +32,8 @@ public class LookSchedulingTest {
|
||||
@Test
|
||||
public void testLookSchedulingEmptyRequests() {
|
||||
LookScheduling lookScheduling = new LookScheduling(50, true, 200);
|
||||
List<Integer> requests = Arrays.asList();
|
||||
List<Integer> expected = Arrays.asList();
|
||||
List<Integer> requests = emptyList();
|
||||
List<Integer> expected = emptyList();
|
||||
|
||||
List<Integer> result = lookScheduling.execute(requests);
|
||||
assertEquals(expected, result);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.thealgorithms.scheduling.diskscheduling;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -31,8 +32,8 @@ public class ScanSchedulingTest {
|
||||
@Test
|
||||
public void testScanSchedulingEmptyRequests() {
|
||||
ScanScheduling scanScheduling = new ScanScheduling(50, true, 200);
|
||||
List<Integer> requests = Arrays.asList();
|
||||
List<Integer> expected = Arrays.asList();
|
||||
List<Integer> requests = emptyList();
|
||||
List<Integer> expected = emptyList();
|
||||
|
||||
List<Integer> result = scanScheduling.execute(requests);
|
||||
assertEquals(expected, result);
|
||||
|
||||
Reference in New Issue
Block a user