diff options
| author | Camille Mougey <commial@gmail.com> | 2018-06-09 09:05:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-09 09:05:05 +0200 |
| commit | 990060f21e515ff1a25246f8fdf0936a97ac698f (patch) | |
| tree | b10543391f9a66ddd5e3f6852c30d96b169b623d /test/arch/x86/unit/mn_strings.py | |
| parent | dadfaabc3fff5edb9bf4ef7e7e8c4cfc4baccb94 (diff) | |
| parent | 61551fa78e9dd22ed1f982b4fe171fd6383c39a6 (diff) | |
| download | miasm-990060f21e515ff1a25246f8fdf0936a97ac698f.tar.gz miasm-990060f21e515ff1a25246f8fdf0936a97ac698f.zip | |
Merge pull request #751 from serpilliere/ExprLabel
Expr Loc
Diffstat (limited to 'test/arch/x86/unit/mn_strings.py')
| -rwxr-xr-x | test/arch/x86/unit/mn_strings.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/arch/x86/unit/mn_strings.py b/test/arch/x86/unit/mn_strings.py index 3cb70e2a..44da0a70 100755 --- a/test/arch/x86/unit/mn_strings.py +++ b/test/arch/x86/unit/mn_strings.py @@ -21,7 +21,8 @@ class Test_SCAS(Asm_Test_32): def check(self): assert(self.myjit.cpu.ECX == len(self.MYSTRING)) - assert(self.myjit.cpu.EDI == self.myjit.ir_arch.symbol_pool.getby_name('mystr').offset + len(self.MYSTRING)+1) + mystr = self.myjit.ir_arch.symbol_pool.getby_name('mystr') + assert(self.myjit.cpu.EDI == self.myjit.ir_arch.symbol_pool.loc_key_to_offset(mystr) + len(self.MYSTRING)+1) class Test_MOVS(Asm_Test_32): @@ -42,8 +43,10 @@ class Test_MOVS(Asm_Test_32): def check(self): assert(self.myjit.cpu.ECX == 0) - assert(self.myjit.cpu.EDI == self.myjit.ir_arch.symbol_pool.getby_name('buffer').offset + len(self.MYSTRING)) - assert(self.myjit.cpu.ESI == self.myjit.ir_arch.symbol_pool.getby_name('mystr').offset + len(self.MYSTRING)) + buffer = self.myjit.ir_arch.symbol_pool.getby_name('buffer') + assert(self.myjit.cpu.EDI == self.myjit.ir_arch.symbol_pool.loc_key_to_offset(buffer) + len(self.MYSTRING)) + mystr = self.myjit.ir_arch.symbol_pool.getby_name('mystr') + assert(self.myjit.cpu.ESI == self.myjit.ir_arch.symbol_pool.loc_key_to_offset(mystr) + len(self.MYSTRING)) if __name__ == "__main__": |