mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-30 13:24:26 +02:00
Add information about test data in PatcherTest
This commit is contained in:
parent
f45dd511f3
commit
61c0541ef5
@ -13,6 +13,7 @@ import java.io.OutputStream
|
|||||||
*
|
*
|
||||||
* @param input the input stream to read from, must be a JAR
|
* @param input the input stream to read from, must be a JAR
|
||||||
* @param signatures the signatures
|
* @param signatures the signatures
|
||||||
|
* @sample net.revanced.patcher.PatcherTest
|
||||||
*/
|
*/
|
||||||
class Patcher(
|
class Patcher(
|
||||||
input: InputStream,
|
input: InputStream,
|
||||||
|
@ -4,20 +4,29 @@ import net.revanced.patcher.patch.Patch
|
|||||||
import net.revanced.patcher.patch.PatchResultSuccess
|
import net.revanced.patcher.patch.PatchResultSuccess
|
||||||
import net.revanced.patcher.signature.Signature
|
import net.revanced.patcher.signature.Signature
|
||||||
import net.revanced.patcher.util.ExtraTypes
|
import net.revanced.patcher.util.ExtraTypes
|
||||||
import net.revanced.patcher.writer.ASMWriter.testingWow
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.objectweb.asm.Opcodes.*
|
import org.objectweb.asm.Opcodes.*
|
||||||
import org.objectweb.asm.Type
|
import org.objectweb.asm.Type
|
||||||
|
|
||||||
internal class PatcherTest {
|
internal class PatcherTest {
|
||||||
private val testSigs: Array<Signature> = arrayOf(
|
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(
|
Signature(
|
||||||
"mainMethod",
|
"mainMethod",
|
||||||
Type.VOID_TYPE,
|
Type.VOID_TYPE,
|
||||||
ACC_PUBLIC or ACC_STATIC,
|
ACC_PUBLIC or ACC_STATIC,
|
||||||
arrayOf(ExtraTypes.ArrayAny),
|
arrayOf(ExtraTypes.ArrayAny),
|
||||||
arrayOf(
|
arrayOf(
|
||||||
GETSTATIC,
|
|
||||||
LDC,
|
LDC,
|
||||||
INVOKEVIRTUAL
|
INVOKEVIRTUAL
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user