<reponame>tqa236/leetcode-solutions<filename>exercises/1247-MinimumSwapsToMakeStringsEqual/minimum_swaps_test.py<gh_stars>1-10
import unittest

from minimum_swaps import Solution


class Test(unittest.TestCase):
    def test_1(self):
        solution = Solution()
        self.assertEqual(solution.minimumSwap("xx", "yy"), 1)

    def test_2(self):
        solution = Solution()
        self.assertEqual(solution.minimumSwap("xx", "xy"), -1)

    def test_3(self):
        solution = Solution()
        self.assertEqual(solution.minimumSwap("xxyyxyxyxx", "xyyxyxxxyx"), 4)


if __name__ == "__main__":
    unittest.main()

import unittest

from minimum_swaps import Solution


class Test(unittest.TestCase):
    def test_1(self):
        solution = Solution()
        self.assertEqual(solution.minimumSwap("xx", "yy"), 1)

    def test_2(self):
        solution = Solution()
        self.assertEqual(solution.minimumSwap("xx", "xy"), -1)

    def test_3(self):
        solution = Solution()
        self.assertEqual(solution.minimumSwap("xxyyxyxyxx", "xyyxyxxxyx"), 4)


if __name__ == "__main__":
    unittest.main()