mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-02 08:24:51 +00:00
highlighting refactored
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.helpers.HilightedText;
|
||||
import com.jpexs.decompiler.flash.helpers.HilightedTextWriter;
|
||||
import com.jpexs.decompiler.flash.tags.DoABCDefineTag;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
@@ -44,8 +45,8 @@ public class ActionScript3Test {
|
||||
private void decompileMethod(String methodName, String expectedResult, boolean isStatic) {
|
||||
int bodyIndex = abc.findMethodBodyByName(clsIndex, methodName);
|
||||
assertTrue(bodyIndex > -1);
|
||||
String actualResult = abc.bodies[bodyIndex].toString(methodName, ExportMode.SOURCE, isStatic, -1/*FIX?*/, clsIndex, abc,null, abc.constants, abc.method_info, new Stack<GraphTargetItem>(), false, new ArrayList<String>(), abc.instance_info[clsIndex].instance_traits);
|
||||
actualResult = actualResult.replaceAll("[ \r\n]", "");
|
||||
HilightedTextWriter writer = abc.bodies[bodyIndex].toString(methodName, ExportMode.SOURCE, isStatic, -1/*FIX?*/, clsIndex, abc,null, abc.constants, abc.method_info, new Stack<GraphTargetItem>(), false, new ArrayList<String>(), abc.instance_info[clsIndex].instance_traits);
|
||||
String actualResult = writer.toString().replaceAll("[ \r\n]", "");
|
||||
expectedResult = expectedResult.replaceAll("[ \r\n]", "");
|
||||
assertEquals(actualResult, expectedResult);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user