Skip to content

Commit 253c700

Browse files
authored
Merge branch 'master' into master
2 parents ded1ff9 + b3c2c7a commit 253c700

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

.gitpod.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM gitpod/workspace-java-21:2025-02-10-10-54-28
1+
FROM gitpod/workspace-java-21:2025-05-14-07-50-25
22

33
ENV LLVM_SCRIPT="tmp_llvm.sh"
44

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<dependency>
2121
<groupId>org.junit</groupId>
2222
<artifactId>junit-bom</artifactId>
23-
<version>5.12.2</version>
23+
<version>5.13.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
@@ -115,7 +115,7 @@
115115
<dependency>
116116
<groupId>com.puppycrawl.tools</groupId>
117117
<artifactId>checkstyle</artifactId>
118-
<version>10.24.0</version>
118+
<version>10.25.0</version>
119119
</dependency>
120120
</dependencies>
121121
</plugin>
@@ -130,7 +130,7 @@
130130
<plugin>
131131
<groupId>com.mebigfatguy.fb-contrib</groupId>
132132
<artifactId>fb-contrib</artifactId>
133-
<version>7.6.9</version>
133+
<version>7.6.10</version>
134134
</plugin>
135135
<plugin>
136136
<groupId>com.h3xstream.findsecbugs</groupId>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import java.lang.reflect.Method;
77
import java.util.ArrayList;
8-
import java.util.Collection;
98
import java.util.List;
109
import org.junit.jupiter.api.DynamicTest;
1110
import org.junit.jupiter.api.Test;
@@ -47,7 +46,7 @@ public void testCustomConstructorInvalidRatio(double ratio) {
4746
}
4847

4948
@TestFactory
50-
public Collection<DynamicTest> dynamicTestsForSorting() {
49+
public List<DynamicTest> dynamicTestsForSorting() {
5150
List<DynamicTest> dynamicTests = new ArrayList<>();
5251
double[] ratios = {0.1, 0.2, 0.5, 0.9};
5352

@@ -60,7 +59,7 @@ public Collection<DynamicTest> dynamicTestsForSorting() {
6059
return dynamicTests;
6160
}
6261

63-
private Collection<DynamicTest> createDynamicTestsForRatio(double ratio) {
62+
private List<DynamicTest> createDynamicTestsForRatio(double ratio) {
6463
List<DynamicTest> dynamicTests = new ArrayList<>();
6564
for (TestMethod testMethod : getTestMethodsFromSuperClass()) {
6665
dynamicTests.add(DynamicTest.dynamicTest("Ratio: " + ratio + " - Test: " + testMethod.name(), testMethod.executable()));

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
import org.junit.jupiter.api.function.Executable;
77
import org.junit.jupiter.params.ParameterizedTest;
88
import org.junit.jupiter.params.provider.Arguments;
9-
import org.junit.jupiter.params.provider.ArgumentsProvider;
10-
import org.junit.jupiter.params.provider.ArgumentsSource;
9+
import org.junit.jupiter.params.provider.MethodSource;
1110

1211
public class SpreadSortTest extends SortingAlgorithmTest {
1312

@@ -20,16 +19,13 @@ SortAlgorithm getSortAlgorithm() {
2019
return new SpreadSort();
2120
}
2221

23-
static class ConstructorArgumentsProvider implements ArgumentsProvider {
24-
@Override
25-
public Stream<? extends Arguments> provideArguments(org.junit.jupiter.api.extension.ExtensionContext context) {
26-
return Stream.of(Arguments.of(0, 16, 2, IllegalArgumentException.class), Arguments.of(16, 0, 2, IllegalArgumentException.class), Arguments.of(16, 16, 0, IllegalArgumentException.class), Arguments.of(1001, 16, 2, IllegalArgumentException.class),
27-
Arguments.of(16, 1001, 2, IllegalArgumentException.class), Arguments.of(16, 16, 101, IllegalArgumentException.class));
28-
}
22+
private static Stream<Arguments> wrongConstructorInputs() {
23+
return Stream.of(Arguments.of(0, 16, 2, IllegalArgumentException.class), Arguments.of(16, 0, 2, IllegalArgumentException.class), Arguments.of(16, 16, 0, IllegalArgumentException.class), Arguments.of(1001, 16, 2, IllegalArgumentException.class),
24+
Arguments.of(16, 1001, 2, IllegalArgumentException.class), Arguments.of(16, 16, 101, IllegalArgumentException.class));
2925
}
3026

3127
@ParameterizedTest
32-
@ArgumentsSource(ConstructorArgumentsProvider.class)
28+
@MethodSource("wrongConstructorInputs")
3329
void testConstructor(int insertionSortThreshold, int initialBucketCapacity, int minBuckets, Class<Exception> expectedException) {
3430
Executable executable = () -> new SpreadSort(insertionSortThreshold, initialBucketCapacity, minBuckets);
3531
assertThrows(expectedException, executable);

0 commit comments

Comments
 (0)