fix tests
This commit is contained in:
parent
ca31c41726
commit
5d687081fb
1 changed files with 4 additions and 2 deletions
|
|
@ -84,7 +84,7 @@ fn get_class_dex<'a, 'b>(name: &'a str, dex: &'b DexFileReader) -> Option<&'b Cl
|
|||
|
||||
fn get_method_code_dex(name: &str, dex: &DexFileReader) -> Option<CodeItem> {
|
||||
let method = IdMethod::from_smali(name).unwrap();
|
||||
let class_name: String = (&method.class_.0).into();
|
||||
let class_name: String = (&method.class_.0).try_into().unwrap();
|
||||
let class = get_class_dex(&class_name, dex);
|
||||
let class = if let Some(class) = class {
|
||||
class
|
||||
|
|
@ -653,7 +653,9 @@ fn test_hidden_api() {
|
|||
}
|
||||
for cls in apk.dex_files.get("classes.dex").unwrap().classes.keys() {
|
||||
assert!(
|
||||
apktool_result.get::<String>((&cls.0).into()).is_some(),
|
||||
apktool_result
|
||||
.get::<String>((&cls.0).try_into().unwrap())
|
||||
.is_some(),
|
||||
"{} not found in core-oj-33_hiddenapi.json",
|
||||
cls.__str__()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue