def test_buildTransPDA_Except3(self): T = 'q__0, q, qwerty -> jk' try: Trans = ui.buildTransPDA(T) self.assertFalse(True) except: self.assertTrue(True)
def test_buildTransPDA_Except5(self): T = '->' try: Trans = ui.buildTransPDA(T) self.assertFalse(True) except: self.assertTrue(True)
def test_buildTransPDA_Except2(self): T = 'q, w, e, = 45, 6' try: Trans = ui.buildTransPDA(T) self.assertFalse(True) except: self.assertTrue(True)
def test_buildTransPDA_Except1(self): T = 'the, jkl 89 -> 890, i' try: Trans = ui.buildTransPDA(T) self.assertFalse(True) except: self.assertTrue(True)
def test_buildTransPDA_3(self): T = 'q1, ba, 09 -> q2, 09' Trans = ui.buildTransPDA(T) self.assertEqual(['q1', 'ba', '09', 'q2', '09'], Trans)
def test_buildTransPDA_2(self): T = '((q0, bg, q9) -> yip, 2' Trans = ui.buildTransPDA(T) self.assertEqual(['((q0', 'bg', 'q9)', 'yip', '2'], Trans)
def test_buildTransPDA_1(self): T = 'q__0, a, q_1 -> qq, 0' Trans = ui.buildTransPDA(T) self.assertEqual(['q__0', 'a', 'q_1', 'qq', '0'], Trans)