Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@ -1,11 +1,10 @@
package com.thealgorithms.maths;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
class CollatzConjectureTest {
@ -28,13 +27,34 @@ class CollatzConjectureTest {
@Test
void collatzConjecture() {
final List<Integer> expected = List.of(35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1);
final List<Integer> expected = List.of(
35,
106,
53,
160,
80,
40,
20,
10,
5,
16,
8,
4,
2,
1
);
assertIterableEquals(expected, cConjecture.collatzConjecture(35));
}
@Test
void sequenceOfNotNaturalFirstNumber() {
assertThrows(IllegalArgumentException.class, () -> cConjecture.collatzConjecture(0));
assertThrows(IllegalArgumentException.class, () -> cConjecture.collatzConjecture(-1));
assertThrows(
IllegalArgumentException.class,
() -> cConjecture.collatzConjecture(0)
);
assertThrows(
IllegalArgumentException.class,
() -> cConjecture.collatzConjecture(-1)
);
}
}
}