Ejemplo n.º 1
0
 def test_good_case2(self):
     s = r'''
     0 1 2 0
     0 2 1 0
     1 2 0 0
     1 3 5 0
     2 3 6 0
     3
     '''
     fsa = k2host.str_to_fsa(s)
     self.assertTrue(k2host.is_acyclic(fsa))
Ejemplo n.º 2
0
 def test_bad_cases1(self):
     s = r'''
     0 1 2 0
     0 4 0 0
     0 2 0 0
     1 2 1 0
     1 3 0 0
     2 1 0 0
     3
     '''
     fsa = k2host.str_to_fsa(s)
     self.assertFalse(k2host.is_acyclic(fsa))
Ejemplo n.º 3
0
 def test_good_cases1(self):
     # empty fsa
     array_size = k2host.IntArray2Size(0, 0)
     fsa = k2host.Fsa.create_fsa_with_size(array_size)
     self.assertTrue(k2host.is_acyclic(fsa))