def test15(self): actual = islands.process([ "LCCWWWLWLLWWCWWLC", "CLWCCCWWWLCCWCCCL", "LLWCWWCLLLCLCCLWC", "WLWLCCLCCCCCLWCLL", "LLLLCWCCWCCLLCCCC", "CCCLCWWLLCLWWWCWC", "LLCCLLWLWWCWLWWLC", "WLLLWWCLLCCWWLWLC", "WCWLCLWCLWLLWWLCW", "WCLWCLCCLCLWLCCCW", "CLLLWWWWLCLLWWLLC", "CWCWLWWWCWWLWWCWW", "WLCWLLCCLLLLCCWCC", "LLLCCCCCWCLCLLCLC", "LLLLCWCCWLWWCCWCC", "CLLWLWCLWCLWLLWCW", "WLWLWWCLCWWCLLLWW", "WLLCWLCWWCCCWWWCC", "LCCCWLLCWLCCLCLCC", "LWLLLWLWCLLCWLLLC", "LLWLLWWCWWCLLWCCC", "CLLLWLLCCLWLWCLCL", "CLLCWWLCLWCLLWWLC", "CCCLWWCWWCLCWCLLC", "LWWWLWLCCCCLLWCCC", "WLLWWLCLLCWWCWLCL", "WLLCWLCCLLLLCWLCC" ]) expected = 6 self.assertEqual( expected, actual )
def test03(self): actual = islands.process([ "LW", "CC", "WL" ]) expected = 1 self.assertEqual( expected, actual )
def test02(self): actual = islands.process([ "CCCCC", "CCCCC", "CCCCC", "CCCCC" ]) expected = 0 self.assertEqual( expected, actual )
def test06(self): actual = islands.process([ "WWCCCLCCLWLWCLWLLCCC", "LWCLCWCWWCWCLWWLLWLW", "LLCWLWWWWWLCLWWLCWCW", "WCCWCWWLWCWWWWWLLCWW", "WWWCLCCLLLCWCCWWWLWL", ]) expected = 5 self.assertEqual( expected, actual )
def test04(self): actual = islands.process([ "LL", "WC", "CC", "LL", "WW", "CC" ]) expected = 1 self.assertEqual( expected, actual )
def test09(self): actual = islands.process([ "CLLC", "LLCL", "WLCL", "CLLW", "LWWL", "WWCL", "CCLL", "WCCW", "CWWC", "WWWL" ]) expected = 3 self.assertEqual( expected, actual )
def test05(self): actual = islands.process([ "LL", "LW", "LC", "LL", "LW", "CW", "CW", "CL", "WC", "LC", "WC", "CL", "WC", "LL", "LL", "WW", "CW", "LC", "LC", "LL", "CL", "LW", "WC", "WC", "LC", "WL", "CL", "CL", "WC", "WC", "CL", "WW", "CL" ]) expected = 4 self.assertEqual( expected, actual )
def testNone(self): actual = islands.process( None ) expected = -1 self.assertEqual( expected, actual )
def test01(self): actual = islands.process([ "WCLWCLLLWCCWL" ]) expected = 3 self.assertEqual( expected, actual )
def test01Cloud(self): actual = islands.process([ "C" ]) expected = 0 self.assertEqual( expected, actual )
def test01Land(self): actual = islands.process([ "L" ]) expected = 1 self.assertEqual( expected, actual )
def test00(self): actual = islands.process( [] ) expected = 0 self.assertEqual( expected, actual )