From e82459d37759e1a5a860d3e7fcdf69d95b06858e Mon Sep 17 00:00:00 2001 From: Lucaskyy Date: Fri, 15 Apr 2022 11:55:35 +0200 Subject: [PATCH] fix: signature checker with changes of patcher --- .gitignore | 2 +- src/test/kotlin/app/revanced/patches/SignatureChecker.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 48d035ac4..414507c33 100644 --- a/.gitignore +++ b/.gitignore @@ -114,4 +114,4 @@ gradle-app.setting # gradle/wrapper/gradle-wrapper.properties # Potentially copyrighted test APK -stock.apk \ No newline at end of file +*.apk \ No newline at end of file diff --git a/src/test/kotlin/app/revanced/patches/SignatureChecker.kt b/src/test/kotlin/app/revanced/patches/SignatureChecker.kt index 4b0ce884c..e989350b2 100644 --- a/src/test/kotlin/app/revanced/patches/SignatureChecker.kt +++ b/src/test/kotlin/app/revanced/patches/SignatureChecker.kt @@ -10,9 +10,9 @@ import java.io.File internal class SignatureChecker { @Test fun checkSignatures() { - val file = File("newest.apk") + val file = File("stock.apk") if (!file.exists()) { - throw IllegalStateException("Missing stock.apk! To run this test, please place stock.apk here: ${file.absolutePath}") + throw IllegalStateException("Missing $file! To run this test, please place stock.apk here: ${file.absolutePath}") } val patcher = Patcher(file) patcher.addPatches(Index.patches.map { it() }) @@ -30,10 +30,10 @@ internal class SignatureChecker { println("Signature: ${signature.metadata.name}.\nMethod: ${method.definingClass}->${method.toStr()}\nWarnings: ${warnings.count()}") for (warning in warnings) { - println("${warning.instructionIndex} / ${warning.patternIndex}: ${warning.current} (expected: ${warning.expected})") + println("${warning.instructionIndex} / ${warning.patternIndex}: ${warning.wrongOpcode} (expected: ${warning.correctOpcode})") } - println("=".repeat(20) + "\n") + println("=".repeat(20)) } } if (unresolved.isNotEmpty()) {