Dump the raw bytes and the disassembled instruction before calling self.assertTrue() instead of after,

in case the assert fails for any reason.

llvm-svn: 148717
This commit is contained in:
Johnny Chen 2012-01-23 19:37:53 +00:00
parent 8c84d4591d
commit e20e9aeb25
1 changed files with 3 additions and 3 deletions

View File

@ -30,14 +30,14 @@ class DisassembleRawDataTestCase(TestBase):
inst = insts.GetInstructionAtIndex(0)
self.assertTrue (inst.GetMnemonic(target) == "movq")
self.assertTrue (inst.GetOperands(target) == '%' + "rsp, " + '%' + "rbp")
if self.TraceOn():
print
print "Raw bytes: ", [hex(x) for x in raw_bytes]
print "Disassembled:", inst
self.assertTrue (inst.GetMnemonic(target) == "movq")
self.assertTrue (inst.GetOperands(target) == '%' + "rsp, " + '%' + "rbp")
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()