mirror of
https://github.com/androguard/androguard.git
synced 2024-11-23 05:00:11 +00:00
fixing tests
This commit is contained in:
parent
2abb5f5641
commit
ef94f00606
@ -7594,7 +7594,7 @@ class DalvikVMFormat(bytecode.BuffHandle):
|
||||
|
||||
:param buff: a string which represents the classes.dex file
|
||||
:param decompiler: associate a decompiler object to display the java source code
|
||||
:type buff: string
|
||||
:type buff: bytes
|
||||
:type decompiler: object
|
||||
|
||||
example::
|
||||
|
@ -23,12 +23,16 @@ class AnalysisTest(unittest.TestCase):
|
||||
|
||||
self.assertEqual(len(list(dx.get_internal_classes())), 1353) # checked by reading the dex header
|
||||
self.assertEqual(len(dx.get_strings()), 1564)
|
||||
self.assertEqual(len(list(dx.get_methods())), 11694)
|
||||
self.assertEqual(len(list(dx.get_methods())), 11691)
|
||||
self.assertEqual(len(list(dx.get_fields())), 3033)
|
||||
self.assertEqual(len(list(dx.get_external_classes())), 394)
|
||||
self.assertEqual(len(list(dx.get_external_classes())), 388)
|
||||
|
||||
for cls in dx.get_external_classes():
|
||||
self.assertEqual(cls.name[0], 'L')
|
||||
self.assertEqual(cls.name[-1], ';')
|
||||
|
||||
# Filter all support libraries
|
||||
self.assertEqual(len(list(dx.find_classes("^(?!Landroid/support).*;$"))), 516)
|
||||
self.assertEqual(len(list(dx.find_classes("^(?!Landroid/support).*;$"))), 512)
|
||||
self.assertEqual(len(list(dx.find_classes("^(?!Landroid/support).*;$", no_external=True))), 124)
|
||||
|
||||
# Find all constructors by method name
|
||||
|
Loading…
Reference in New Issue
Block a user