diff options
| author | Peter LaFosse <peter@vector35.com> | 2019-04-05 10:47:00 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2019-04-05 10:51:35 -0400 |
| commit | 04f85cd1a8511b32f2d919f1ff6050fd10ca90e0 (patch) | |
| tree | 328d564dc9e841f0b955ef1c36413d5e6dfefba0 | |
| parent | c66269f43fa42f3d880139a6969944bbc0a461e1 (diff) | |
Add dominator and post_dominator to unit tests
| -rw-r--r-- | suite/testcommon.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/suite/testcommon.py b/suite/testcommon.py index 0cb0d853..f221bbef 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -376,6 +376,17 @@ class BinaryViewTestBuilder(Builder): return fixOutput(retinfo) + def test_dominators(self): + """Dominators don't match oracle""" + retinfo = [] + for func in self.bv.functions: + for bb in func: + for dom in bb.dominators: + retinfo.append("Dominator: %x of %x" % (dom.start, bb.start)) + for pdom in bb.post_dominators: + retinfo.append("PostDominator: %x of %x" % (pdom.start, bb.start)) + return fixOutput(retinfo) + class TestBuilder(Builder): """ The TestBuilder is for tests that need to be checked against a stored oracle data that isn't from a binary. These test are |
