summaryrefslogtreecommitdiff
path: root/tests/analysis/disass/links.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/analysis/disass/links.py')
-rw-r--r--tests/analysis/disass/links.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/analysis/disass/links.py b/tests/analysis/disass/links.py
index e0c9ec9..e4c9946 100644
--- a/tests/analysis/disass/links.py
+++ b/tests/analysis/disass/links.py
@@ -62,11 +62,14 @@ class TestDisassLinks(ChrysalideTestCase):
binary.analyze_and_wait()
+ sym = fmt.find_symbol_by_label('main')
+ self.assertIsNotNone(sym)
+
nat_count = 0
- for ins in binary.processor.instrs:
- for _, dt in ins.destinations:
- if dt == ArchInstruction.ILT_EXEC_FLOW:
+ for blk in sym.basic_blocks:
+ for _, dt in blk.destinations:
+ if dt == ArchInstruction.ILT_LOOP:
nat_count += 1
- self.assertEqual(nat_count, 3)
+ self.assertEqual(nat_count, 1)