Skip to content

Commit

Permalink
test: 거리두기 확인하기 테스트 코드
Browse files Browse the repository at this point in the history
  • Loading branch information
rldnrl committed Oct 9, 2023
1 parent 200a9e6 commit 1e33937
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/programmers/lv2/CheckDistanceTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package programmers.lv2;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

public class CheckDistanceTest {
@Test
void solutionTest() {
String[][] input1 = {{"POOOP", "OXXOX", "OPXPX", "OOXOX", "POXXP"}, {"POOPX", "OXPXP", "PXXXO", "OXXXO", "OOOPP"}, {"PXOPX", "OXOXP", "OXPOX", "OXXOP", "PXPOX"}, {"OOOXX", "XOOOX", "OOOXX", "OXOOX", "OOOOO"}, {"PXPXP", "XPXPX", "PXPXP", "XPXPX", "PXPXP"}};
int[] answer = {1, 0, 1, 1, 1};
CheckDistance checkDistance = new CheckDistance();
System.out.println(Arrays.toString(checkDistance.solution(input1)));
Assertions.assertArrayEquals(checkDistance.solution(input1), answer);
}
}

0 comments on commit 1e33937

Please sign in to comment.