tests: reformat code
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestArgInline extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("a++;"));
|
||||
assertThat(code, not(containsString("a = a + 1;")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,7 +27,6 @@ public class TestClassGen extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("public static interface I {"));
|
||||
assertThat(code, containsString(indent(2) + "int test();"));
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TestRedundantBrackets extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("(-1)")));
|
||||
assertThat(code, not(containsString("return;")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class TestRedundantReturn extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("return;")));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class TestStaticFieldsInit extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("public static final String s2 = null;")));
|
||||
// TODO:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,7 +27,6 @@ public class TestStringBuilderElimination extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(MyException.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("MyException(String str, Exception e) {"));
|
||||
assertThat(code, containsString("super(\"msg:\" + str, e);"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -19,7 +19,9 @@ public class TestWrongCode extends IntegrationTest {
|
||||
|
||||
@SuppressWarnings("empty")
|
||||
private int test2(int a) {
|
||||
if (a == 0);
|
||||
if (a == 0) {
|
||||
;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
@@ -29,7 +31,6 @@ public class TestWrongCode extends IntegrationTest {
|
||||
disableCompilation();
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("return false.length;")));
|
||||
assertThat(code, containsString("return null.length;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.annotations;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -50,7 +50,6 @@ public class TestAnnotations extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("@A(a = 255)")));
|
||||
assertThat(code, containsOne("@A(a = -1)"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.annotations;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -30,7 +30,6 @@ public class TestAnnotations2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("@Target({ElementType.TYPE})"));
|
||||
assertThat(code, containsString("@Retention(RetentionPolicy.RUNTIME)"));
|
||||
|
||||
+1
-2
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.annotations;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -37,7 +37,6 @@ public class TestParamAnnotations extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("void test1(@A int i) {"));
|
||||
assertThat(code, containsString("void test2(int i, @A int j) {"));
|
||||
|
||||
+1
-2
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.annotations;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class TestVarArgAnnotation extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("void test1(int... a) {"));
|
||||
assertThat(code, containsString("void test2(int i, Object... a) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arith;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestArith extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("a += 2;"));
|
||||
assertThat(code, containsString("a++;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arith;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestArith2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return (a + 2) * 3;"));
|
||||
assertThat(code, not(containsString("a + 2 * 3")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arith;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class TestFieldIncrement extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("instanceField++;"));
|
||||
assertThat(code, containsString("staticField--;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arith;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestFieldIncrement2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("this.a.f += n;"));
|
||||
assertThat(code, containsString("a.f *= n;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arith;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -48,7 +48,6 @@ public class TestSpecialValues extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("Float.NaN, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, " +
|
||||
"Float.MIN_VALUE, Float.MAX_VALUE, Float.MIN_NORMAL"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arrays;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -21,7 +21,6 @@ public class TestArrayFill extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return new String[]{\"1\", \"2\", \"3\"};"));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.arrays;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestArrayFill2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return new int[]{1, a + 1, 2};"));
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -52,7 +52,6 @@ public class TestCmpOp extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return a > 3.0f;"));
|
||||
assertThat(code, containsString("return b < 2.0f;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class TestCmpOp2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return a > b;"));
|
||||
assertThat(code, containsString("return ((double) c) < d;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -21,7 +21,6 @@ public class TestConditions extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("(!a || !b) && !c")));
|
||||
assertThat(code, containsString("return (a && b) || c;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class TestConditions10 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("return")));
|
||||
assertThat(code, containsOne("if (a || b > 2) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -28,7 +28,6 @@ public class TestConditions11 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("if (a || b > 2) {"));
|
||||
assertThat(code, containsOne("f();"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -56,7 +56,6 @@ public class TestConditions12 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("if (quality >= 10 && raw != 0) {"));
|
||||
assertThat(code, containsOne("} else if (raw == 0 || quality < 6 || !qualityReading) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class TestConditions13 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("if (quality >= 10 && raw != 0) {"));
|
||||
assertThat(code, containsOne("System.out.println(\"OK\" + raw);"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestConditions14 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("boolean r = a == null ? b != null : !a.equals(b);"));
|
||||
assertThat(code, containsOne("if (r) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -61,7 +61,6 @@ public class TestConditions15 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("\"1\".equals(name)"));
|
||||
assertThat(code, containsOne("\"30\".equals(name)"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,7 +27,6 @@ public class TestConditions2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
// assertThat(code, containsString("return;"));
|
||||
// assertThat(code, not(containsString("else")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -61,7 +61,6 @@ public class TestConditions3 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return null;"));
|
||||
assertThat(code, not(containsString("else")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -22,7 +22,6 @@ public class TestConditions4 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("num >= 59 && num <= 66"));
|
||||
assertThat(code, containsString("return inRange ? num + 1 : num;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -39,7 +39,6 @@ public class TestConditions5 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("if (a1 == null) {"));
|
||||
assertThat(code, containsString("if (a2 != null) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestConditions6 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return l1.size() == 0;"));
|
||||
assertThat(code, not(containsString("else")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -23,7 +23,6 @@ public class TestConditions7 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("if (i >= 0 && i < a.length) {"));
|
||||
assertThat(code, not(containsString("||")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -63,7 +63,6 @@ public class TestConditions8 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("showMore();"));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestConditions9 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("if (!a || (b >= 0 && b <= 11)) {"));
|
||||
assertThat(code, containsOne("System.out.println('1');"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class TestElseIf extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("} else if (str.equals(\"b\")) {"));
|
||||
assertThat(code, containsOne("} else {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class TestNestedIf extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("if (this.a0) {"));
|
||||
assertThat(code, containsOne("if (this.a1 == 0 || this.a2 == 0) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class TestSimpleConditions extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("return (a[0] && a[1] && a[2]) || (a[3] && a[4]);"));
|
||||
assertThat(code, containsString("return a[0] || a[1] || a[2] || a[3];"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestTernary extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("else")));
|
||||
assertThat(code, containsString("return a != 2;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestTernary2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertEquals(1, count(code, "assertTrue"));
|
||||
assertEquals(1, count(code, "f(1, 0)"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.conditions;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestTernaryInIf extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("return a ? b : c;"));
|
||||
assertThat(code, containsOne("return (a ? b : c) ? 1 : 2;"));
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package jadx.tests.integration.debuginfo;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.codegen.CodeWriter;
|
||||
import jadx.core.dex.attributes.nodes.LineAttrNode;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.FieldNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package jadx.tests.integration.debuginfo;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.codegen.CodeWriter;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Map;
|
||||
@@ -38,7 +38,6 @@ public class TestLineNumbers2 extends IntegrationTest {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
CodeWriter codeWriter = cls.getCode();
|
||||
String code = codeWriter.toString();
|
||||
System.out.println(code);
|
||||
|
||||
Map<Integer, Integer> lineMapping = codeWriter.getLineMapping();
|
||||
assertEquals("{8=18, 11=22, 12=23, 13=24, 14=28, 16=25, 17=26, 18=28, 21=31, 22=32}",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.enums;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -42,7 +42,6 @@ public class TestEnums extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsLines(1, "public enum EmptyEnum {", "}"));
|
||||
assertThat(code, containsLines(1,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.enums;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.tests.api.utils.JadxMatchers;
|
||||
|
||||
import org.junit.Test;
|
||||
@@ -32,7 +32,6 @@ public class TestEnums2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, JadxMatchers.containsLines(1,
|
||||
"public enum Operation {",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.generics;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestGenerics extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("mthWildcard(List<?> list)"));
|
||||
assertThat(code, containsString("mthExtends(List<? extends A> list)"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.generics;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
import java.lang.ref.WeakReference;
|
||||
@@ -38,7 +38,6 @@ public class TestGenerics2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("public ItemReference(V item, Object id, ReferenceQueue<? super V> queue) {"));
|
||||
assertThat(code, containsString("public V get(Object id) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.generics;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class TestGenerics3 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("mthExtendsArray(List<? extends byte[]> list)"));
|
||||
assertThat(code, containsString("mthSuperArray(List<? super int[]> list)"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.generics;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -23,7 +23,6 @@ public class TestGenerics4 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("Class<?>[] a ="));
|
||||
assertThat(code, not(containsString("Class[] a =")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inline;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inline;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class TestInline2 extends IntegrationTest {
|
||||
public int test() throws InterruptedException {
|
||||
int[] a = new int[]{1, 2, 4, 6, 8};
|
||||
int b = 0;
|
||||
for (int i = 0; i < a.length; i+=2) {
|
||||
for (int i = 0; i < a.length; i += 2) {
|
||||
b += a[i];
|
||||
}
|
||||
for (long i = b; i > 0; i--) {
|
||||
@@ -28,7 +28,6 @@ public class TestInline2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("int[] a = new int[]{1, 2, 4, 6, 8};"));
|
||||
assertThat(code, containsOne("for (int i = 0; i < a.length; i += 2) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inline;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestInline3 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("this(b1, b2, 0, 0, 0);"));
|
||||
assertThat(code, containsString("super(a, a);"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inline;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -26,7 +26,6 @@ public class TestInline6 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("System.out.println(System.nanoTime() - start);"));
|
||||
assertThat(code, not(containsString("System.out.println(System.nanoTime() - System.nanoTime());")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inline;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -36,7 +36,6 @@ public class TestInlineInLoop extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("int c"));
|
||||
assertThat(code, containsOne("c = b + 1"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inline;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -37,7 +37,6 @@ public class TestSyntheticInline extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("synthetic")));
|
||||
assertThat(code, not(containsString("access$")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -50,7 +50,6 @@ public class TestAnonymousClass2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("synthetic")));
|
||||
assertThat(code, not(containsString("AnonymousClass_")));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -43,7 +43,6 @@ public class TestAnonymousClass3 extends IntegrationTest {
|
||||
disableCompilation();
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString(indent(4) + "public void run() {"));
|
||||
assertThat(code, containsString(indent(3) + "}.start();"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class TestAnonymousClass4 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne(indent(3) + "new Thread() {"));
|
||||
assertThat(code, containsOne(indent(4) + "{"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -22,7 +22,6 @@ public class TestInnerClass extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("Inner {"));
|
||||
assertThat(code, containsString("Inner2 extends Thread {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.inner;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestInnerClass3 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("synthetic")));
|
||||
assertThat(code, not(containsString("access$")));
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class TestOverloadedMethodInvoke extends IntegrationTest {
|
||||
public void method(Throwable th) {
|
||||
c++;
|
||||
if (th != null) {
|
||||
c+=100;
|
||||
c += 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestArrayForEach extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsLines(2,
|
||||
"int sum = 0;",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestArrayForEach2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsLines(2,
|
||||
"for (String s : str.split(\"\\n\")) {",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -49,7 +49,6 @@ public class TestArrayForEachNegative extends IntegrationTest {
|
||||
disableCompilation();
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString(":")));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class TestBreakInLoop extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("for (int i = 0; i < a.length; i++) {"));
|
||||
// assertThat(code, containsOne("a[i]++;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestIndexForLoop extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsLines(2,
|
||||
"int sum = 0;",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class TestIterableForEach extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsLines(2,
|
||||
"StringBuilder sb = new StringBuilder();",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -44,7 +44,6 @@ public class TestIterableForEach2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("for (Authorization auth : service.getAuthorizations()) {"));
|
||||
assertThat(code, containsOne("if (isValid(auth)) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TestLoopCondition extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("i < this.f.length()"));
|
||||
assertThat(code, containsOne("list.set(i, \"ABC\")"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -25,7 +25,6 @@ public class TestLoopCondition2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("int i = 0;"));
|
||||
assertThat(code, containsOne("while (a && i < 10) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -33,7 +33,6 @@ public class TestLoopCondition3 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("while (a < 12) {"));
|
||||
assertThat(code, containsOne("if (b + a < 9 && b < 8) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,7 +27,6 @@ public class TestLoopCondition4 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("int n = -1;"));
|
||||
assertThat(code, containsOne("while (n < 0) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class TestLoopConditionInvoke extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("do {"));
|
||||
assertThat(code, containsOne("if (ch == '\\u0000') {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestLoopDetection extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("while (i < a.length && i < b) {"));
|
||||
assertThat(code, containsString("while (i < a.length) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class TestLoopDetection2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("int c = a + b;"));
|
||||
assertThat(code, containsOne("for (int i = a; i < b; i++) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -35,7 +35,6 @@ public class TestLoopDetection3 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("while"));
|
||||
// TODO
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -38,7 +38,6 @@ public class TestLoopDetection4 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("while (this.iterator.hasNext()) {"));
|
||||
assertThat(code, containsOne("if (filtered != null) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -36,7 +36,6 @@ public class TestNestedLoops extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("for (String s1 : l1) {"));
|
||||
assertThat(code, containsOne("for (String s2 : l2) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class TestNestedLoops2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("for (int i = 0; i < list.size(); i++) {"));
|
||||
assertThat(code, containsOne("while (j < ((String) list.get(i)).length()) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.loops;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -38,7 +38,6 @@ public class TestSequentialLoops extends IntegrationTest {
|
||||
disableCompilation();
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, countString(2, "while ("));
|
||||
assertThat(code, containsOne("break;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.names;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class TestSameMethodsNames extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("new Bug().Bug();"));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.others;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -43,7 +43,6 @@ public class TestIfInTry extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("if (a != 0) {"));
|
||||
assertThat(code, containsOne("} catch (Exception e) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.others;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -51,7 +51,6 @@ public class TestIfTryInCatch extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, countString(2, "try {"));
|
||||
assertThat(code, containsOne("if ("));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.others;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
@@ -91,7 +91,6 @@ public class TestIssue13a extends IntegrationTest {
|
||||
disableCompilation();
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
for (int i = 1; i <= 7; i++) {
|
||||
assertThat(code, containsOne("\"" + i + "\""));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.others;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -80,7 +80,6 @@ public class TestIssue13b extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, countString(4, "} catch ("));
|
||||
assertThat(code, countString(3, "Log.e("));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.others;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -40,7 +40,6 @@ public class TestLoopInTry extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("try {"));
|
||||
assertThat(code, containsOne("if (b) {"));
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package jadx.tests.integration.others;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.io.EOFException;
|
||||
|
||||
@@ -44,7 +44,6 @@ public class TestLoopInTry2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("try {"));
|
||||
assertThat(code, containsOne("while (in.hasMore()) {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.switches;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -42,7 +42,6 @@ public class TestSwitch extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("case '/':"));
|
||||
assertThat(code, containsString(indent(5) + "break;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.switches;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.switches;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -34,7 +34,6 @@ public class TestSwitchNoDefault extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertEquals(4, count(code, "break;"));
|
||||
assertEquals(1, count(code, "System.out.println(s);"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.switches;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -40,7 +40,6 @@ public class TestSwitchSimple extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertEquals(5, count(code, "break;"));
|
||||
assertEquals(1, count(code, "System.out.println(s);"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.synchronize;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class TestSynchronized extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, not(containsString("synchronized (this) {")));
|
||||
assertThat(code, containsString("public synchronized boolean test1() {"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.synchronize;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -20,7 +20,6 @@ public class TestSynchronized2 extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsString("private static synchronized boolean test(Object obj) {"));
|
||||
assertThat(code, containsString("obj.toString() != null;"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package jadx.tests.integration.trycatch;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -33,7 +33,6 @@ public class TestInlineInCatch extends IntegrationTest {
|
||||
public void test() {
|
||||
ClassNode cls = getClassNode(TestCls.class);
|
||||
String code = cls.getCode().toString();
|
||||
System.out.println(code);
|
||||
|
||||
assertThat(code, containsOne("File output = null;"));
|
||||
assertThat(code, containsOne("output = File.createTempFile(\"f\", \"a\", "));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user