mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
Add information about test data in PatcherTest
This commit is contained in:
parent
f45dd511f3
commit
61c0541ef5
2 changed files with 12 additions and 2 deletions
|
@ -13,6 +13,7 @@ import java.io.OutputStream
|
|||
*
|
||||
* @param input the input stream to read from, must be a JAR
|
||||
* @param signatures the signatures
|
||||
* @sample net.revanced.patcher.PatcherTest
|
||||
*/
|
||||
class Patcher(
|
||||
input: InputStream,
|
||||
|
|
|
@ -4,20 +4,29 @@ import net.revanced.patcher.patch.Patch
|
|||
import net.revanced.patcher.patch.PatchResultSuccess
|
||||
import net.revanced.patcher.signature.Signature
|
||||
import net.revanced.patcher.util.ExtraTypes
|
||||
import net.revanced.patcher.writer.ASMWriter.testingWow
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.objectweb.asm.Opcodes.*
|
||||
import org.objectweb.asm.Type
|
||||
|
||||
internal class PatcherTest {
|
||||
private val testSigs: Array<Signature> = arrayOf(
|
||||
// Java:
|
||||
// public static void main(String[] args) {
|
||||
// System.out.println("Hello, world!");
|
||||
// }
|
||||
// Bytecode:
|
||||
// public static main(java.lang.String[] arg0) { // Method signature: ([Ljava/lang/String;)V
|
||||
// getstatic java/lang/System.out:java.io.PrintStream
|
||||
// ldc "Hello, world!" (java.lang.String)
|
||||
// invokevirtual java/io/PrintStream.println(Ljava/lang/String;)V
|
||||
// return
|
||||
// }
|
||||
Signature(
|
||||
"mainMethod",
|
||||
Type.VOID_TYPE,
|
||||
ACC_PUBLIC or ACC_STATIC,
|
||||
arrayOf(ExtraTypes.ArrayAny),
|
||||
arrayOf(
|
||||
GETSTATIC,
|
||||
LDC,
|
||||
INVOKEVIRTUAL
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue