Esempio n. 1
0
 def test_generate_path_only_valid_offset_params(self):
     # must combine an initial state w/ 'length' unrolling
     with self.assertRaises(ValueError):
         diagnosability.generate_path(-1, 5)
     
     with self.assertRaises(ValueError):
         diagnosability.generate_path(0, -5)
Esempio n. 2
0
 def test_generate_path_offset_zero(self):
     # when offset is 0 path is just your regular path
     
     # - test 1 - just the initial state
     regular = bmcutils.BmcModel().path(0)
     tool    = diagnosability.generate_path(0, 0)
     self.assertEqual(regular, tool)
     
     # - test 2 - more steps unrolled
     regular = bmcutils.BmcModel().path(3)
     tool    = diagnosability.generate_path(0, 3)
     self.assertEqual(regular, tool)
Esempio n. 3
0
 def test_generate_path_offset_x(self):
     # must combine an initial state w/ 'length' unrolling
     model   = bmcutils.BmcModel()
     manual  = model.init[5] & model.unrolling(5, 10)
     tool    = diagnosability.generate_path(5, 5)
     self.assertEqual(manual, tool)