From 9318109a7d0189b916440b0a77b9a5dfc60b0c30 Mon Sep 17 00:00:00 2001 From: Honfika Date: Sat, 14 Dec 2013 23:46:35 +0100 Subject: [PATCH] tests fixed --- trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java | 5 ++++- .../com/jpexs/decompiler/flash/generators/AS3Generator.java | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java index c13b2677b..4b7aaa293 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -3,6 +3,7 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; +import com.jpexs.decompiler.flash.helpers.NulWriter; import com.jpexs.decompiler.flash.tags.DoABCDefineTag; import com.jpexs.decompiler.flash.tags.Tag; import com.jpexs.decompiler.graph.ExportMode; @@ -49,7 +50,9 @@ public class ActionScript3Test { assertTrue(bodyIndex > -1); HilightedTextWriter writer = null; try { - writer = abc.bodies[bodyIndex].toString(methodName, ExportMode.SOURCE, isStatic, -1/*FIX?*/, clsIndex, abc,null, abc.constants, abc.method_info, new Stack(), false, new ArrayList(), abc.instance_info[clsIndex].instance_traits); + abc.bodies[bodyIndex].convert(methodName, ExportMode.SOURCE, isStatic, -1/*FIX?*/, clsIndex, abc, null, abc.constants, abc.method_info, new Stack(), false, new NulWriter(), new ArrayList(), abc.instance_info[clsIndex].instance_traits, true); + writer = new HilightedTextWriter(false); + abc.bodies[bodyIndex].toString(methodName, ExportMode.SOURCE, isStatic, -1/*FIX?*/, clsIndex, abc, null, abc.constants, abc.method_info, new Stack(), false, writer, new ArrayList(), abc.instance_info[clsIndex].instance_traits); } catch (InterruptedException ex) { fail(); } diff --git a/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java b/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java index 1d3163f24..c49ad16ac 100644 --- a/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java +++ b/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java @@ -45,7 +45,8 @@ public class AS3Generator { s.append("(){\r\ndecompileMethod(\""); s.append(name); s.append("\", "); - HilightedTextWriter src = abc.findBody(((TraitMethodGetterSetter) t).method_info).toString("", ExportMode.SOURCE, false, -1/*FIX?*/, classId, abc, null,abc.constants, abc.method_info, new Stack(), false, new ArrayList(), abc.instance_info[classId].instance_traits); + HilightedTextWriter src = new HilightedTextWriter(false); + abc.findBody(((TraitMethodGetterSetter) t).method_info).toString("", ExportMode.SOURCE, false, -1/*FIX?*/, classId, abc, null,abc.constants, abc.method_info, new Stack(), false, src, new ArrayList(), abc.instance_info[classId].instance_traits); String[] srcs = src.toString().split("[\r\n]+"); for (int i = 0; i < srcs.length; i++) { String ss = srcs[i];