style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -1,29 +1,28 @@
package com.thealgorithms.others;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
public class LineSweepTest {
@Test
void testForOverlap(){
int[][]arr = {{0,10},{7,20},{15,24}};
void testForOverlap() {
int[][] arr = {{0, 10}, {7, 20}, {15, 24}};
assertTrue(LineSweep.isOverlap(arr));
}
@Test
void testForNoOverlap(){
int[][]arr = {{0,10},{11,20},{21,24}};
void testForNoOverlap() {
int[][] arr = {{0, 10}, {11, 20}, {21, 24}};
assertFalse(LineSweep.isOverlap(arr));
}
@Test
void testForOverlapWhenEndAEqualsStartBAndViceVersa(){
int[][]arr = {{0,10},{10,20},{21,24}};
void testForOverlapWhenEndAEqualsStartBAndViceVersa() {
int[][] arr = {{0, 10}, {10, 20}, {21, 24}};
assertTrue(LineSweep.isOverlap(arr));
}
@Test
void testForMaximumEndPoint(){
int[][]arr = {{10,20},{1,100},{14,16},{1,8}};
assertEquals(100,LineSweep.FindMaximumEndPoint(arr));
void testForMaximumEndPoint() {
int[][] arr = {{10, 20}, {1, 100}, {14, 16}, {1, 8}};
assertEquals(100, LineSweep.FindMaximumEndPoint(arr));
}
}