Skip to content

Commit 6690617

Browse files
author
alxklm
committed
checkstyle: fix formatting
1 parent 30d898a commit 6690617

File tree

2 files changed

+6
-69
lines changed

2 files changed

+6
-69
lines changed

src/test/java/com/thealgorithms/sorts/RadixSortTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import static org.junit.jupiter.api.Assertions.assertThrows;
55

66
import java.util.stream.Stream;
7-
87
import org.junit.jupiter.api.Test;
98
import org.junit.jupiter.params.ParameterizedTest;
109
import org.junit.jupiter.params.provider.Arguments;
Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,17 @@
11
package com.thealgorithms.sorts;
22

3-
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
4-
5-
import org.junit.jupiter.api.Test;
6-
73
/**
84
* @author Rebecca Velez (https://github.com/rebeccavelez)
95
* @see SlowSort
106
*/
117

12-
public class SlowSortTest {
13-
14-
private SlowSort slowSort = new SlowSort();
15-
16-
@Test
17-
public void slowSortEmptyArray() {
18-
Integer[] inputArray = {};
19-
Integer[] outputArray = slowSort.sort(inputArray);
20-
Integer[] expectedOutput = {};
21-
assertArrayEquals(outputArray, expectedOutput);
22-
}
23-
24-
@Test
25-
public void slowSortSingleIntegerElementArray() {
26-
Integer[] inputArray = {5};
27-
Integer[] outputArray = slowSort.sort(inputArray);
28-
Integer[] expectedOutput = {5};
29-
assertArrayEquals(outputArray, expectedOutput);
30-
}
31-
32-
@Test
33-
public void slowSortSingleStringElementArray() {
34-
String[] inputArray = {"k"};
35-
String[] outputArray = slowSort.sort(inputArray);
36-
String[] expectedOutput = {"k"};
37-
assertArrayEquals(outputArray, expectedOutput);
38-
}
39-
40-
@Test
41-
public void slowSortIntegerArray() {
42-
Integer[] inputArray = {8, 84, 53, -683, 953, 64, 2, 202, 98, -10};
43-
Integer[] outputArray = slowSort.sort(inputArray);
44-
Integer[] expectedOutput = {-683, -10, 2, 8, 53, 64, 84, 98, 202, 953};
45-
assertArrayEquals(outputArray, expectedOutput);
46-
}
47-
48-
@Test
49-
public void slowSortDuplicateIntegerArray() {
50-
Integer[] inputArray = {8, 84, 8, -2, 953, 64, 2, 953, 98};
51-
Integer[] outputArray = slowSort.sort(inputArray);
52-
Integer[] expectedOutput = {-2, 2, 8, 8, 64, 84, 98, 953, 953};
53-
assertArrayEquals(outputArray, expectedOutput);
54-
}
55-
56-
@Test
57-
public void slowSortStringArray() {
58-
String[] inputArray = {"g", "d", "a", "b", "f", "c", "e"};
59-
String[] outputArray = slowSort.sort(inputArray);
60-
String[] expectedOutput = {"a", "b", "c", "d", "e", "f", "g"};
61-
assertArrayEquals(outputArray, expectedOutput);
62-
}
63-
64-
@Test
65-
public void slowSortDuplicateStringArray() {
66-
String[] inputArray = {"g", "d", "a", "g", "b", "f", "d", "c", "e"};
67-
String[] outputArray = slowSort.sort(inputArray);
68-
String[] expectedOutput = {"a", "b", "c", "d", "d", "e", "f", "g", "g"};
69-
assertArrayEquals(outputArray, expectedOutput);
8+
public class SlowSortTest extends SortingAlgorithmTest {
9+
protected int getGeneratedArraySize() {
10+
return 100;
7011
}
7112

72-
@Test
73-
public void slowSortStringSymbolArray() {
74-
String[] inputArray = {"cbf", "auk", "ó", "(b", "a", ")", "au", "á", "cba", "auk", "(a", "bhy", "cba"};
75-
String[] outputArray = slowSort.sort(inputArray);
76-
String[] expectedOutput = {"(a", "(b", ")", "a", "au", "auk", "auk", "bhy", "cba", "cba", "cbf", "á", "ó"};
77-
assertArrayEquals(outputArray, expectedOutput);
13+
@Override
14+
SortAlgorithm getSortAlgorithm() {
15+
return new SlowSort();
7816
}
7917
}

0 commit comments

Comments
 (0)