mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-02 10:44:49 +00:00
disabled debug info during tests
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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_");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user