comparison paraspace/tests/injection_test.py @ 140:d4e794249b0f

Fixing back to back association and encoding issue
author Thinker K.F. Li <thinker@codemud.net>
date Thu, 11 Aug 2011 09:20:46 +0800
parents 0704e23009e4
children 90690a001172
comparison
equal deleted inserted replaced
139:0704e23009e4 140:d4e794249b0f
639 hello_linked.find_typeid_name('Lcom/codemud/helloworld/helloworld;') 639 hello_linked.find_typeid_name('Lcom/codemud/helloworld/helloworld;')
640 helloworld_methodids = \ 640 helloworld_methodids = \
641 hello_linked.find_methodids_typeid(helloworld_typeid) 641 hello_linked.find_methodids_typeid(helloworld_typeid)
642 for methodid in helloworld_methodids: 642 for methodid in helloworld_methodids:
643 methodname = hello_linked.get_methodid_name(methodid) 643 methodname = hello_linked.get_methodid_name(methodid)
644 print 'TEST', methodname
645 if methodname == 'onClick': 644 if methodname == 'onClick':
646 methodidx = hello_linked.get_idx_methodid(methodid) 645 methodidx = hello_linked.get_idx_methodid(methodid)
647 method = hello_linked.find_method_idx(methodidx) 646 method = hello_linked.find_method_idx(methodidx)
648 blk = dexfile.DEXFile_linked.get_code_block_method(method) 647 blk = dexfile.DEXFile_linked.get_code_block_method(method)
649 opvectors = decode_insn_blk(blk) 648 opvectors = decode_insn_blk(blk)
652 methodidx = opvectors[12][1][1] 651 methodidx = opvectors[12][1][1]
653 saved_methodid1 = hello_linked.find_methodid_idx(methodidx) 652 saved_methodid1 = hello_linked.find_methodid_idx(methodidx)
654 elif methodname == 'write_file': 653 elif methodname == 'write_file':
655 assert methodid in hello_linked.methodIds.items 654 assert methodid in hello_linked.methodIds.items
656 methodidx = hello_linked.get_idx_methodid(methodid) 655 methodidx = hello_linked.get_idx_methodid(methodid)
657 print 'TEST', dexfile.DEXFile_linked.get_typeid_name(methodid.classIdx)
658 method = hello_linked.find_method_idx(methodidx) 656 method = hello_linked.find_method_idx(methodidx)
659 blk = dexfile.DEXFile_linked.get_code_block_method(method) 657 blk = dexfile.DEXFile_linked.get_code_block_method(method)
660 opvectors = decode_insn_blk(blk) 658 opvectors = decode_insn_blk(blk)
661 print opvectors 659 print opvectors
662 pass 660 pass