Skip to content

Commit 53f5e24

Browse files
committed
Update SolutionTest.kt
1 parent d0100c7 commit 53f5e24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/kotlin/g1901_2000/s1901_find_a_peak_element_ii/SolutionTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package g1901_2000.s1901_find_a_peak_element_ii
22

33
import org.hamcrest.CoreMatchers.equalTo
44
import org.hamcrest.MatcherAssert.assertThat
5+
import org.junit.jupiter.api.Assertions
56
import org.junit.jupiter.api.Test
67

78
internal class SolutionTest {
@@ -67,15 +68,15 @@ internal class SolutionTest {
6768

6869
val peak = Solution().findPeakGrid(mat)
6970

70-
assertTrue(peak[0] >= 0 && peak[1] >= 0)
71+
Assertions.assertTrue(peak[0] >= 0 && peak[1] >= 0)
7172

7273
val value = mat[peak[0]][peak[1]]
7374
val up = if (peak[0] > 0) mat[peak[0] - 1][peak[1]] else -1
7475
val down = if (peak[0] < mat.size - 1) mat[peak[0] + 1][peak[1]] else -1
7576
val left = if (peak[1] > 0) mat[peak[0]][peak[1] - 1] else -1
7677
val right = if (peak[1] < mat[0].size - 1) mat[peak[0]][peak[1] + 1] else -1
7778

78-
assertTrue(value > up && value > down && value > left && value > right)
79+
Assertions.assertTrue(value > up && value > down && value > left && value > right)
7980
}
8081

8182
@Test

0 commit comments

Comments
 (0)