Mercurial > paraspace
changeset 42:8ca4a6bc6b79
Extract to dex_deptracker.build_dependencies
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 19 Jun 2011 14:26:09 +0800 |
parents | c5cfc796af8b |
children | 5cea19126a11 |
files | paraspace/dex_deptracker.py paraspace/tests/dexfile_test.py |
diffstat | 2 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/paraspace/dex_deptracker.py Sun Jun 19 13:47:35 2011 +0800 +++ b/paraspace/dex_deptracker.py Sun Jun 19 14:26:09 2011 +0800 @@ -600,6 +600,13 @@ pass +def build_dependencies(dexroot, all_dep_decls): + _build_associations(dexroot) + _build_refs(dexroot) + _link_dependencies(dexroot, all_dep_decls) + pass + + def _sync_dependencies(): pass
--- a/paraspace/tests/dexfile_test.py Sun Jun 19 13:47:35 2011 +0800 +++ b/paraspace/tests/dexfile_test.py Sun Jun 19 14:26:09 2011 +0800 @@ -200,9 +200,7 @@ def link_dependencies_test(): from paraspace.dex_deptracker import collect_all_dep_decls - from paraspace.dex_deptracker import _build_associations - from paraspace.dex_deptracker import _build_refs - from paraspace.dex_deptracker import _link_dependencies + from paraspace.dex_deptracker import build_dependencies from paraspace.dex_deptracker import _install_markers, _idx_marker from paraspace.dex_deptracker import _offset_marker, _rel_offset_marker from paraspace.dex_deptracker import _patch_dex_type_markers @@ -219,11 +217,8 @@ testdatapath = os.path.join(srcroot, 'data', 'testdata1.dex') dex = dexfile.DEXFile.open(testdatapath) - _build_associations(dex) - _build_refs(dex) - _link_dependencies(dex, all_dep_decls) + build_dependencies(dex, all_dep_decls) code_item = dex.codeItems.items[0] - print code_item.debugInfoOff.__class__ assert code_item.debugInfoOff.__class__.__name__ == '_DEX_DebugInfoItem' pass