Files
Neutron/tests/test_collision_dispatch.py

20 lines
642 B
Python

from pathlib import Path
import sys
import unittest
ROOT=Path(__file__).resolve().parents[1]
sys.path.insert(0,str(ROOT/'tools/binary'))
from collision_dispatch import collect
class DispatcherProbeTests(unittest.TestCase):
def test_source_callgraph_and_fixture_relocations(self):
report=collect(ROOT.parent/'Original')
self.assertEqual(len(report['bodies']),10)
operands=report['probe_operands']
self.assertEqual(len({p['va'] for p in operands}),len(operands))
self.assertTrue(any(p['target']==0x509B24 for p in operands))
self.assertTrue(any(p['target']==0x695D4C for p in operands))
if __name__=='__main__':unittest.main()