mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-19 05:38:47 +00:00
Fixed tests
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.graph.ExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FilenameFilter;
|
||||
@@ -81,19 +81,19 @@ public class ExportTest {
|
||||
|
||||
@Test(dataProvider = "swfFiles")
|
||||
public void testDecompileAS(File f) {
|
||||
testDecompile(f, ExportMode.SOURCE);
|
||||
testDecompile(f, ScriptExportMode.AS);
|
||||
}
|
||||
|
||||
@Test(dataProvider = "swfFiles")
|
||||
public void testDecompilePcode(File f) {
|
||||
testDecompile(f, ExportMode.PCODE);
|
||||
testDecompile(f, ScriptExportMode.PCODE);
|
||||
}
|
||||
|
||||
public void testDecompile(File f, ExportMode exportMode) {
|
||||
public void testDecompile(File f, ScriptExportMode exportMode) {
|
||||
try {
|
||||
SWF swf = new SWF(new FileInputStream(f), false);
|
||||
Configuration.debugCopy.set(true);
|
||||
String folderName = exportMode == ExportMode.SOURCE ? "output" : "outputp";
|
||||
String folderName = exportMode == ScriptExportMode.AS ? "output" : "outputp";
|
||||
File fdir = new File(TESTDATADIR + File.separator + folderName + File.separator + f.getName());
|
||||
fdir.mkdirs();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user