File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ import pytest
2+ import requests
3+
4+ from quark .core .apkinfo import AndroguardImp
5+ from quark .core .interface .baseapkinfo import BaseApkinfo
6+ from quark .core .rzapkinfo import RizinImp
7+ from quark .core .struct .bytecodeobject import BytecodeObject
8+ from quark .core .struct .methodobject import MethodObject
9+
10+
11+ OPS = [
12+ {
13+ "mnemonic" : "const-class" ,
14+ "parameter" : "Landroid/view/KeyEvent;" ,
15+ "expect_type" : str ,
16+ },
17+ {
18+ "mnemonic" : "const-wide/16" ,
19+ "parameter" : 0x3e8 ,
20+ "expect_type" : float ,
21+ },
22+ {
23+ "mnemonic" : "invoke-virtual" ,
24+ "parameter" : ("Ljava/lang/StringBuilder;->append(Ljava/lang/String;)"
25+ "Ljava/lang/StringBuilder;" ),
26+ "expect_type" : str ,
27+ },
28+ {
29+ "mnemonic" : "const-string" ,
30+ "parameter" : "str.google.c.a.tc" ,
31+ "expect_type" : str ,
32+ },
33+ ]
34+
35+
36+ class TestRzApkinfo :
37+
38+ def test_parse_parameter (self ):
39+ for op in OPS :
40+ parsed_param = RizinImp ._parse_parameter (op .get ("parameter" ))
41+ assert isinstance (parsed_param , op .get ("expect_type" ))
You can’t perform that action at this time.
0 commit comments