Exemple #1
0
 def test_rotate_left1(self):
     self.seqA = [1, 2, 3]
     self.seqB = [2, 3, 1]
     self.assertEqual(rac.RotatedArray(self.racclass, self.seqA, self.seqB),
                      True)
Exemple #2
0
 def test_rotate_unsorted(self):
     self.seqA = [3, 1, 0, 4]
     self.seqB = [4, 3, 1, 0]
     self.assertEqual(rac.RotatedArray(self.racclass, self.seqA, self.seqB),
                      True)
Exemple #3
0
 def test_rotate_impossible(self):
     self.seqA = [1, 2, 3]
     self.seqB = [2, 3, 4]
     self.assertEqual(rac.RotatedArray(self.racclass, self.seqA, self.seqB),
                      False)
Exemple #4
0
 def test_rotate_left2(self):
     self.seqA = [1, 2, 3, 4]
     self.seqB = [3, 4, 1, 2]
     self.assertEqual(rac.RotatedArray(self.racclass, self.seqA, self.seqB),
                      True)