def test_rule_001(self): oRule = wait.rule_001() self.assertTrue(oRule) self.assertEqual(oRule.name, 'wait') self.assertEqual(oRule.identifier, '001') dExpected = [34, 36] oRule.analyze(oFile) self.assertEqual(oRule.violations, dExpected)
def test_fix_rule_001(self): oRule = wait.rule_001() dExpected = [] oRule.fix(oFile) oRule.analyze(oFile) self.assertEqual(oRule.violations, dExpected) self.assertEqual(oFile.lines[34].line, ' wait for 10ns;') self.assertEqual(oFile.lines[35].line, ' wait on a,b;') self.assertEqual(oFile.lines[36].line, ' wait until a = \'0\';')
def test_fix_rule_001(self): oRule = wait.rule_001() oRule.fix(self.oFile) lActual = self.oFile.get_lines() self.assertEqual(lExpected, lActual) oRule.analyze(self.oFile) self.assertEqual(oRule.violations, [])
def test_rule_001(self): oRule = wait.rule_001() self.assertTrue(oRule) self.assertEqual(oRule.name, 'wait') self.assertEqual(oRule.identifier, '001') lExpected = [34, 36] oRule.analyze(self.oFile) self.assertEqual( lExpected, utils.extract_violation_lines_from_violation_object( oRule.violations))