Skip to content

Commit 705a810

Browse files
committed
Fix the smoke tests
- Add a colon if the API class defined in a rule missed one
1 parent 6cc023e commit 705a810

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

quark/core/struct/ruleobject.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def __init__(self, ruleJson: os.PathLike, jsonData: dict = None) -> None:
4343

4444
self._api = self._json_obj["api"]
4545
for index in range(len(self._api)):
46+
if not self._api[index]["class"].endswith(";"):
47+
self._api[index]["class"] += ";"
48+
4649
descriptor = self._api[index]["descriptor"]
4750
if " " not in descriptor:
4851
self._api[index][

tests/core/struct/test_ruleobject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ def test_init_with_complete_rule(self, complete_rule):
9898
]
9999
assert rule.api == [
100100
{
101-
"class": "Landroid/telephony/TelephonyManager",
101+
"class": "Landroid/telephony/TelephonyManager;",
102102
"method": "getCellLocation",
103103
"descriptor": "()Landroid/telephony/CellLocation;",
104104
},
105105
{
106-
"class": "Landroid/telephony/SmsManager",
106+
"class": "Landroid/telephony/SmsManager;",
107107
"method": "sendTextMessage",
108108
"descriptor": (
109109
"(Ljava/lang/String; Ljava/lang/String;"

0 commit comments

Comments
 (0)