From e21b59bff4fca135ea1e777336b9074ad78c0b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Mon, 22 Jul 2013 21:42:46 +0200 Subject: [PATCH] tests fix --- .../decompiler/flash/ActionScript3Test.java | 2 +- .../com/jpexs/decompiler/flash/ExportTest.java | 17 ++++++----------- .../jpexs/decompiler/flash/RecompileTest.java | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java index e8e246799..873030d8b 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -1,9 +1,9 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.flash.tags.DoABCDefineTag; import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.graph.GraphTargetItem; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; diff --git a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java index 9bea00884..cedd30220 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java @@ -37,31 +37,27 @@ public class ExportTest { public static final String TESTDATADIR = "testdata/decompile"; @BeforeClass - public void addLogger(){ + public void addLogger() { Configuration.setConfig("autoDeobfuscate", Boolean.TRUE); Logger logger = Logger.getLogger(""); logger.addHandler(new Handler() { - @Override public void publish(LogRecord record) { - if(record.getLevel()==Level.SEVERE){ - fail("Error during decompilation",record.getThrown()); + if (record.getLevel() == Level.SEVERE) { + fail("Error during decompilation", record.getThrown()); } } @Override public void flush() { - } @Override public void close() throws SecurityException { - } }); } - - + @DataProvider(name = "swfFiles") public Object[][] createData() { File dir = new File(TESTDATADIR); @@ -88,14 +84,13 @@ public class ExportTest { Configuration.DEBUG_COPY = true; File fdir = new File(TESTDATADIR + File.separator + "output" + File.separator + f.getName()); fdir.mkdirs(); - - swf.exportActionScript(new AbortRetryIgnoreHandler() { + swf.exportActionScript(new AbortRetryIgnoreHandler() { @Override public int handle(Throwable thrown) { return AbortRetryIgnoreHandler.ABORT; } - },fdir.getAbsolutePath(), false, false); + }, fdir.getAbsolutePath(), false, false); } catch (Exception ex) { fail(); } diff --git a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java index 110932308..328fe17d1 100644 --- a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -15,7 +15,7 @@ public class RecompileTest { private void testRecompileOne(String filename) { try { - SWF swf = new SWF(new FileInputStream(TESTDATADIR + File.separator + filename),false); + SWF swf = new SWF(new FileInputStream(TESTDATADIR + File.separator + filename), false); Configuration.DEBUG_COPY = true; swf.saveTo(new ByteArrayOutputStream()); } catch (IOException ex) {