Skip to content

Commit 3f65a3b

Browse files
authored
Added tests 9, 10.
1 parent 3ddb43e commit 3f65a3b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/test/kotlin/g0001_0100/s0009_palindrome_number/SolutionTest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ package g0001_0100.s0009_palindrome_number
22

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

67
internal class SolutionTest {
8+
@Test
79
fun isPalindrome() {
810
assertThat(Solution().isPalindrome(121), equalTo(true))
911
}
1012

13+
@Test
1114
fun isPalindrome2() {
1215
assertThat(Solution().isPalindrome(-121), equalTo(false))
1316
}
1417

18+
@Test
1519
fun isPalindrome3() {
1620
assertThat(Solution().isPalindrome(10), equalTo(false))
1721
}

src/test/kotlin/g0001_0100/s0010_regular_expression_matching/SolutionTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,30 @@ package g0001_0100.s0010_regular_expression_matching
22

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

67
internal class SolutionTest {
8+
@Test
79
fun isMatch() {
810
assertThat(Solution().isMatch("aa", "a"), equalTo(false))
911
}
1012

13+
@Test
1114
fun isMatch2() {
1215
assertThat(Solution().isMatch("aa", "a*"), equalTo(true))
1316
}
1417

18+
@Test
1519
fun isMatch3() {
1620
assertThat(Solution().isMatch("ab", ".*"), equalTo(true))
1721
}
1822

23+
@Test
1924
fun isMatch4() {
2025
assertThat(Solution().isMatch("aab", "c*a*b"), equalTo(true))
2126
}
2227

28+
@Test
2329
fun isMatch5() {
2430
assertThat(Solution().isMatch("mississippi", "mis*is*p*."), equalTo(false))
2531
}

0 commit comments

Comments
 (0)