コード例 #1
0
    def test_FourCharStringLookingAtIndexOneAndTwo(self):
        s = "xxxx"
        expected = "xxxx"

        actual = maxPalindromeSubstring.find_palindrome_from_center(s, 1, 2)

        self.assertEqual(expected, actual)
コード例 #2
0
    def test_SingleCharString(self):
        s = "x"
        expected = "x"

        actual = maxPalindromeSubstring.find_palindrome_from_center(s, 0, 0)

        self.assertEqual(expected, actual)
コード例 #3
0
    def test_TwoCharStringLookingAtIndexZero(self):
        s = "xx"
        expected = "x"

        actual = maxPalindromeSubstring.find_palindrome_from_center(s, 0, 0)

        self.assertEqual(expected, actual)