|
|
@ -185,9 +185,9 @@ class TestNamingConvention(unittest.TestCase): |
|
|
|
outFD3_lines[i] = outFD3_lines[i].strip() |
|
|
|
outFD3_lines[i] = outFD3_lines[i].strip() |
|
|
|
self.assertTrue(os.path.isfile(self.testFilePath3+".format"),"Patched .format file is not created?!") |
|
|
|
self.assertTrue(os.path.isfile(self.testFilePath3+".format"),"Patched .format file is not created?!") |
|
|
|
self.assertEqual(outFD3_lines[0],"Number of Slither results: 2") |
|
|
|
self.assertEqual(outFD3_lines[0],"Number of Slither results: 2") |
|
|
|
self.assertEqual(outFD3_lines[1],"Number of patches: 6") |
|
|
|
self.assertEqual(outFD3_lines[1],"Number of patches: 8") |
|
|
|
self.assertEqual(outFD3_lines.count("Detector: naming-convention (struct definition)"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("Detector: naming-convention (struct definition)"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("Detector: naming-convention (struct use)"), 4) |
|
|
|
self.assertEqual(outFD3_lines.count("Detector: naming-convention (struct use)"), 6) |
|
|
|
self.assertEqual(outFD3_lines.count("Old string: struct s { uint i; }"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("Old string: struct s { uint i; }"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("New string: struct S { uint i; }"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("New string: struct S { uint i; }"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 108"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 108"), 1) |
|
|
@ -200,14 +200,18 @@ class TestNamingConvention(unittest.TestCase): |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 175"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 175"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 497"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 497"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 501"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 501"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Old string: s sA"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Old string: s sA"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("New string: S sA"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("New string: S sA"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 570"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 570"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 574"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 574"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Old string: s"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 715"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("New string: S"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 719"), 1) |
|
|
|
|
|
|
|
self.assertEqual(outFD3_lines.count("Old string: s"), 2) |
|
|
|
|
|
|
|
self.assertEqual(outFD3_lines.count("New string: S"), 2) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 585"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 585"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 586"), 1) |
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 586"), 1) |
|
|
|
|
|
|
|
self.assertEqual(outFD3_lines.count("Location start: 730"), 1) |
|
|
|
|
|
|
|
self.assertEqual(outFD3_lines.count("Location end: 731"), 1) |
|
|
|
|
|
|
|
|
|
|
|
def test_naming_convention_enum(self): |
|
|
|
def test_naming_convention_enum(self): |
|
|
|
outFD4 = open(self.testFilePath4+".out","r") |
|
|
|
outFD4 = open(self.testFilePath4+".out","r") |
|
|
|