highlighting refactored

This commit is contained in:
Honfika
2013-11-01 01:07:19 +01:00
parent 2cf26a4c31
commit d23c2dbe63
242 changed files with 1572 additions and 1075 deletions

View File

@@ -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);
}