Skip to content

Commit

Permalink
test: 테스트 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
rldnrl committed Oct 20, 2023
1 parent a4ae610 commit 1c64df5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/programmers/lv2/MatrixMultiplyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,19 @@ void solutionTest() {
Assertions.assertArrayEquals(matrixMultiply.solution(arr3, arr4), answer2);

}

@Test()
void solutionTest2() {
MatrixMultiply matrixMultiply = new MatrixMultiply();
int[][] arr1 = {{1, 4}, {3, 2}, {4, 1}};
int[][] arr2 = {{3, 3}, {3, 3}};
int[][] answer1 = {{15, 15}, {15, 15}, {15, 15}};
Assertions.assertArrayEquals(matrixMultiply.solution2(arr1, arr2), answer1);

int[][] arr3 = {{2, 3, 2}, {4, 2, 4}, {3, 1, 4}};
int[][] arr4 = {{5, 4, 3}, {2, 4, 1}, {3, 1, 1}};
int[][] answer2 = {{22, 22, 11}, {36, 28, 18}, {29, 20, 14}};
Assertions.assertArrayEquals(matrixMultiply.solution2(arr3, arr4), answer2);

}
}

0 comments on commit 1c64df5

Please sign in to comment.