core: allow to disable constant dereference (#106)

This commit is contained in:
Skylot
2016-03-13 12:43:24 +03:00
parent 7cba2c3f81
commit 5f302238ad
18 changed files with 366 additions and 139 deletions
@@ -0,0 +1,22 @@
package jadx.cli;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
public class JadxCLIArgsTest {
@Test
public void testInvertedBooleanOption() throws Exception {
assertThat(parse("--no-replace-consts").isReplaceConsts(), is(false));
assertThat(parse("").isReplaceConsts(), is(true));
}
private JadxCLIArgs parse(String... args) {
JadxCLIArgs jadxArgs = new JadxCLIArgs();
boolean res = jadxArgs.processArgs(args);
assertThat(res, is(true));
return jadxArgs;
}
}