From f5c499a923cc83259f736c76c4eb8dba9353eeb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 4 May 2014 17:04:59 +0200 Subject: [PATCH] disabled debug info during tests --- trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java | 6 ++++++ .../jpexs/decompiler/flash/ActionScript2AssemblerTest.java | 2 ++ .../decompiler/flash/ActionScript2DeobfuscatorTest.java | 2 ++ .../jpexs/decompiler/flash/ActionScript2ParserTest.java | 2 ++ .../test/com/jpexs/decompiler/flash/ActionScript2Test.java | 2 ++ .../test/com/jpexs/decompiler/flash/ActionScript3Test.java | 2 ++ trunk/test/com/jpexs/decompiler/flash/ExportTest.java | 6 ++++++ trunk/test/com/jpexs/decompiler/flash/RecompileTest.java | 7 +++++++ trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java | 7 +++++++ 9 files changed, 36 insertions(+) diff --git a/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java b/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java index 5c21c3e92..1011c3843 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java @@ -18,11 +18,13 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABCInputStream; import com.jpexs.decompiler.flash.abc.ABCOutputStream; +import com.jpexs.decompiler.flash.gui.Main; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; /** @@ -30,6 +32,10 @@ import org.testng.annotations.Test; * @author JPEXS */ public class ABCStreamTest { + @BeforeClass + public void init(){ + Main.initLogging(false); + } @Test public void testU30() { diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java index 1f5119792..4dc573cfc 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -42,6 +43,7 @@ public class ActionScript2AssemblerTest extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { + Main.initLogging(false); Configuration.autoDeobfuscate.set(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); } diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java index 154526ad5..a214eabd9 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -40,6 +41,7 @@ public class ActionScript2DeobfuscatorTest extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { + Main.initLogging(false); Configuration.autoDeobfuscate.set(true); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); } diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java index 5694e2ef7..646293cf9 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.tags.DoActionTag; import com.jpexs.decompiler.graph.CompilationException; import java.io.BufferedInputStream; @@ -36,6 +37,7 @@ public class ActionScript2ParserTest extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { + Main.initLogging(false); Configuration.autoDeobfuscate.set(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); } diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java index 8da515257..2fd6c8841 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -42,6 +43,7 @@ public class ActionScript2Test extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { + Main.initLogging(false); Configuration.autoDeobfuscate.set(false); Configuration.decompile.set(true); Configuration.registerNameFormat.set("_loc%d_"); diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java index bcbd883db..05b412470 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -19,6 +19,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.exporters.modes.ScriptExportMode; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.helpers.NulWriter; @@ -49,6 +50,7 @@ public class ActionScript3Test { @BeforeClass public void init() throws IOException, InterruptedException { + Main.initLogging(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as3/as3.swf")), false); DoABCDefineTag tag = null; for (Tag t : swf.tags) { diff --git a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java index 5fe9c27fe..7c9bd83b3 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; +import com.jpexs.decompiler.flash.gui.Main; import java.io.File; import java.io.FileInputStream; import java.io.FilenameFilter; @@ -36,6 +37,11 @@ import org.testng.annotations.Test; */ public class ExportTest { + @BeforeClass + public void init(){ + Main.initLogging(false); + } + public static final String TESTDATADIR = "testdata/decompile"; @BeforeClass diff --git a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java index dc5271a13..4a53ab7a2 100644 --- a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.base.ASMSource; @@ -40,6 +41,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import static org.testng.Assert.fail; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; /** @@ -48,6 +50,11 @@ import org.testng.annotations.Test; */ public class RecompileTest { + @BeforeClass + public void init(){ + Main.initLogging(false); + } + public static final String TESTDATADIR = "testdata/recompile"; private void testRecompileOne(String filename) { diff --git a/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java b/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java index ff3ed8985..543f086d6 100644 --- a/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java @@ -16,12 +16,14 @@ */ package com.jpexs.decompiler.flash; +import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.types.RECT; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; /** @@ -30,6 +32,11 @@ import org.testng.annotations.Test; */ public class SWFStreamTest { + @BeforeClass + public void init(){ + Main.initLogging(false); + } + @Test public void testNeededBits() { assertEquals(SWFOutputStream.getNeededBitsU(3), 2);