changeset 122:6e4b6414789b

Call _install_dexfile_4_deptracker() to make sure testcase right
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 06 Aug 2011 19:07:20 +0800
parents 7644cb633d4b
children 78357afb4a9d
files paraspace/tests/dexfile_test.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/paraspace/tests/dexfile_test.py	Sat Aug 06 08:49:30 2011 +0800
+++ b/paraspace/tests/dexfile_test.py	Sat Aug 06 19:07:20 2011 +0800
@@ -27,6 +27,8 @@
 def dependencies_test():
     from paraspace import dex_deptracker
     
+    _install_dexfile_4_deptracker()
+    
     deps = dex_deptracker.collect_all_dep_decls()
     assert deps['_DEX_AnnotationItem.typeIdx'][0] == dexfile.depend_idx
     assert deps['_DEX_AnnotationItem.typeIdx'][1] == 'DEXFile.typeIds'
@@ -44,7 +46,7 @@
 
 def resolve_name_path_test():
     from paraspace.dex_deptracker import _resolve_name_path
-    
+
     obj, parent = _resolve_name_path('_DEX_ClassData.staticFields.items')
     assert obj == list
     obj, parent = _resolve_name_path('_DEX_ClassData.staticFields.items.*')
@@ -68,6 +70,8 @@
 
 def find_dep_decls_from_clazz_test():
     from paraspace.dex_deptracker import _find_dep_decls_from_clazz
+
+    _install_dexfile_4_deptracker()
     
     dex_types = dict([(dex_type_name, getattr(dexfile, dex_type_name))
                       for dex_type_name in dir(dexfile)
@@ -86,6 +90,8 @@
 def find_dep_decls_from_clazz__array_test():
     from paraspace.dex_deptracker import _find_dep_decls_from_clazz
 
+    _install_dexfile_4_deptracker()
+    
     dex_types = dict([(dex_type_name, getattr(dexfile, dex_type_name))
                       for dex_type_name in dir(dexfile)
                       if dex_type_name.startswith('_DEX_')])
@@ -103,6 +109,8 @@
 def travel_dex_relocatable__array_test():
     from paraspace.dex_deptracker import _travel_dex_relocatable
 
+    _install_dexfile_4_deptracker()
+
     srcdir = os.path.dirname(__file__)
     srcroot = os.path.join(srcdir, '..', '..')
     testdatapath = os.path.join(srcroot, 'data', 'testdata1.dex')