Beispiel #1
0
 def test_isMatch_withdotandstar_notmatch(self):
     solution = Solution()
     self.assertFalse(solution.isMatch("mississippi", "mis*is*p*."))
Beispiel #2
0
 def test_isMatch_match(self):
     solution = Solution()
     self.assertTrue(solution.isMatch("ab", "ab"))
Beispiel #3
0
 def test_isMatch_withdotandstar_match(self):
     solution = Solution()
     self.assertTrue(solution.isMatch("", ".*"))
     self.assertTrue(solution.isMatch("ab", ".*"))
Beispiel #4
0
 def test_isMatch_withstar_notmatch(self):
     solution = Solution()
     self.assertFalse(solution.isMatch("ba", "a*"))
Beispiel #5
0
 def test_isMatch_withstar_match(self):
     solution = Solution()
     self.assertTrue(solution.isMatch("aab", "a*b"))
     self.assertTrue(solution.isMatch("aab", "c*a*b"))
Beispiel #6
0
 def test_isMatch_withdot_notmatch(self):
     solution = Solution()
     self.assertFalse(solution.isMatch("aa", "b."))
Beispiel #7
0
 def test_isMatch_notmatch(self):
     solution = Solution()
     self.assertFalse(solution.isMatch("aa", "a"))