summaryrefslogtreecommitdiffstats
path: root/test/org/jetbrains/java/decompiler/DecompilerTestFixture.java
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-10-09 18:34:08 +0200
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-10-09 18:34:08 +0200
commitce2169f372db942afe566d0dde39688affe171f9 (patch)
tree13ac61d9805f2d377b442da02ec58886adf249ba /test/org/jetbrains/java/decompiler/DecompilerTestFixture.java
parent41b8ab9299542e04e624405aff7dba07a992c297 (diff)
downloadfernflower-ce2169f372db942afe566d0dde39688affe171f9.tar
fernflower-ce2169f372db942afe566d0dde39688affe171f9.tar.gz
fernflower-ce2169f372db942afe566d0dde39688affe171f9.tar.lz
fernflower-ce2169f372db942afe566d0dde39688affe171f9.tar.xz
fernflower-ce2169f372db942afe566d0dde39688affe171f9.zip
java-decompiler: base class extracted to allow decompiler customization in tests
Diffstat (limited to 'test/org/jetbrains/java/decompiler/DecompilerTestFixture.java')
-rw-r--r--test/org/jetbrains/java/decompiler/DecompilerTestFixture.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/org/jetbrains/java/decompiler/DecompilerTestFixture.java b/test/org/jetbrains/java/decompiler/DecompilerTestFixture.java
index 540c998..9508c61 100644
--- a/test/org/jetbrains/java/decompiler/DecompilerTestFixture.java
+++ b/test/org/jetbrains/java/decompiler/DecompilerTestFixture.java
@@ -18,8 +18,11 @@ package org.jetbrains.java.decompiler;
import org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler;
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.Map;
import static org.junit.Assert.assertTrue;
@@ -30,6 +33,10 @@ public class DecompilerTestFixture {
private ConsoleDecompiler decompiler;
public void setUp() throws IOException {
+ setUp(Collections.<String, Object>emptyMap());
+ }
+
+ public void setUp(final Map<String, Object> options) throws IOException {
testDataDir = new File("testData");
if (!isTestDataDir(testDataDir)) testDataDir = new File("community/plugins/java-decompiler/engine/testData");
if (!isTestDataDir(testDataDir)) testDataDir = new File("plugins/java-decompiler/engine/testData");
@@ -49,6 +56,7 @@ public class DecompilerTestFixture {
put(IFernflowerPreferences.REMOVE_SYNTHETIC, "1");
put(IFernflowerPreferences.REMOVE_BRIDGE, "1");
put(IFernflowerPreferences.LITERALS_AS_IS, "1");
+ putAll(options);
}});
}