From 736a71fac21a32dbb1eef9c3a9f0d3005e7d9ca0 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 17 Apr 2022 18:46:27 +0200 Subject: [PATCH] feat: display metadata for each signature in `SignatureChecker` --- src/test/kotlin/app/revanced/patches/SignatureChecker.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/kotlin/app/revanced/patches/SignatureChecker.kt b/src/test/kotlin/app/revanced/patches/SignatureChecker.kt index e989350b2..2e221c09b 100644 --- a/src/test/kotlin/app/revanced/patches/SignatureChecker.kt +++ b/src/test/kotlin/app/revanced/patches/SignatureChecker.kt @@ -27,8 +27,8 @@ internal class SignatureChecker { if (patternScanMethod is PatternScanMethod.Fuzzy) { val warnings = patternScanMethod.warnings!! val method = signature.result!!.method - - println("Signature: ${signature.metadata.name}.\nMethod: ${method.definingClass}->${method.toStr()}\nWarnings: ${warnings.count()}") + val methodFromMetadata = signature.metadata.methodMetadata + println("Signature: ${signature.metadata.name}.\nMethod: ${methodFromMetadata.definingClass}->${methodFromMetadata.name} (Signature matches: ${method.definingClass}->${method.toStr()})\nWarnings: ${warnings.count()}") for (warning in warnings) { println("${warning.instructionIndex} / ${warning.patternIndex}: ${warning.wrongOpcode} (expected: ${warning.correctOpcode})") }