Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
b5f439e1
Commit
b5f439e1
authored
Oct 19, 2014
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: reformat code
parent
202fe5a0
Hide whitespace changes
Inline
Side-by-side
Showing
113 changed files
with
117 additions
and
215 deletions
+117
-215
TestArgInline.java
...e/src/test/java/jadx/tests/integration/TestArgInline.java
+1
-2
TestClassGen.java
...re/src/test/java/jadx/tests/integration/TestClassGen.java
+1
-2
TestDuplicateCast.java
...c/test/java/jadx/tests/integration/TestDuplicateCast.java
+1
-1
TestFloatValue.java
.../src/test/java/jadx/tests/integration/TestFloatValue.java
+1
-1
TestRedundantBrackets.java
...st/java/jadx/tests/integration/TestRedundantBrackets.java
+1
-2
TestRedundantReturn.java
...test/java/jadx/tests/integration/TestRedundantReturn.java
+1
-2
TestReturnWrapping.java
.../test/java/jadx/tests/integration/TestReturnWrapping.java
+1
-1
TestStaticFieldsInit.java
...est/java/jadx/tests/integration/TestStaticFieldsInit.java
+1
-2
TestStaticMethod.java
...rc/test/java/jadx/tests/integration/TestStaticMethod.java
+1
-1
TestStringBuilderElimination.java
.../jadx/tests/integration/TestStringBuilderElimination.java
+1
-2
TestWrongCode.java
...e/src/test/java/jadx/tests/integration/TestWrongCode.java
+4
-3
TestAnnotations.java
...a/jadx/tests/integration/annotations/TestAnnotations.java
+1
-2
TestAnnotations2.java
.../jadx/tests/integration/annotations/TestAnnotations2.java
+1
-2
TestParamAnnotations.java
...x/tests/integration/annotations/TestParamAnnotations.java
+1
-2
TestVarArgAnnotation.java
...x/tests/integration/annotations/TestVarArgAnnotation.java
+1
-2
TestArith.java
...src/test/java/jadx/tests/integration/arith/TestArith.java
+1
-2
TestArith2.java
...rc/test/java/jadx/tests/integration/arith/TestArith2.java
+1
-2
TestFieldIncrement.java
...java/jadx/tests/integration/arith/TestFieldIncrement.java
+1
-2
TestFieldIncrement2.java
...ava/jadx/tests/integration/arith/TestFieldIncrement2.java
+1
-2
TestSpecialValues.java
.../java/jadx/tests/integration/arith/TestSpecialValues.java
+1
-2
TestArrayFill.java
...est/java/jadx/tests/integration/arrays/TestArrayFill.java
+1
-2
TestArrayFill2.java
...st/java/jadx/tests/integration/arrays/TestArrayFill2.java
+1
-2
TestCmpOp.java
...est/java/jadx/tests/integration/conditions/TestCmpOp.java
+1
-2
TestCmpOp2.java
...st/java/jadx/tests/integration/conditions/TestCmpOp2.java
+1
-2
TestConditions.java
...ava/jadx/tests/integration/conditions/TestConditions.java
+1
-2
TestConditions10.java
...a/jadx/tests/integration/conditions/TestConditions10.java
+1
-2
TestConditions11.java
...a/jadx/tests/integration/conditions/TestConditions11.java
+1
-2
TestConditions12.java
...a/jadx/tests/integration/conditions/TestConditions12.java
+1
-2
TestConditions13.java
...a/jadx/tests/integration/conditions/TestConditions13.java
+1
-2
TestConditions14.java
...a/jadx/tests/integration/conditions/TestConditions14.java
+1
-2
TestConditions15.java
...a/jadx/tests/integration/conditions/TestConditions15.java
+1
-2
TestConditions2.java
...va/jadx/tests/integration/conditions/TestConditions2.java
+1
-2
TestConditions3.java
...va/jadx/tests/integration/conditions/TestConditions3.java
+1
-2
TestConditions4.java
...va/jadx/tests/integration/conditions/TestConditions4.java
+1
-2
TestConditions5.java
...va/jadx/tests/integration/conditions/TestConditions5.java
+1
-2
TestConditions6.java
...va/jadx/tests/integration/conditions/TestConditions6.java
+1
-2
TestConditions7.java
...va/jadx/tests/integration/conditions/TestConditions7.java
+1
-2
TestConditions8.java
...va/jadx/tests/integration/conditions/TestConditions8.java
+1
-2
TestConditions9.java
...va/jadx/tests/integration/conditions/TestConditions9.java
+1
-2
TestElseIf.java
...st/java/jadx/tests/integration/conditions/TestElseIf.java
+1
-2
TestNestedIf.java
.../java/jadx/tests/integration/conditions/TestNestedIf.java
+1
-2
TestSimpleConditions.java
...dx/tests/integration/conditions/TestSimpleConditions.java
+1
-2
TestTernary.java
...t/java/jadx/tests/integration/conditions/TestTernary.java
+1
-2
TestTernary2.java
.../java/jadx/tests/integration/conditions/TestTernary2.java
+1
-2
TestTernaryInIf.java
...va/jadx/tests/integration/conditions/TestTernaryInIf.java
+1
-2
TestLineNumbers.java
...ava/jadx/tests/integration/debuginfo/TestLineNumbers.java
+1
-1
TestLineNumbers2.java
...va/jadx/tests/integration/debuginfo/TestLineNumbers2.java
+1
-2
TestEnums.java
...src/test/java/jadx/tests/integration/enums/TestEnums.java
+1
-2
TestEnums2.java
...rc/test/java/jadx/tests/integration/enums/TestEnums2.java
+1
-2
TestGenerics.java
...st/java/jadx/tests/integration/generics/TestGenerics.java
+1
-2
TestGenerics2.java
...t/java/jadx/tests/integration/generics/TestGenerics2.java
+1
-2
TestGenerics3.java
...t/java/jadx/tests/integration/generics/TestGenerics3.java
+1
-2
TestGenerics4.java
...t/java/jadx/tests/integration/generics/TestGenerics4.java
+1
-2
TestInline.java
...c/test/java/jadx/tests/integration/inline/TestInline.java
+1
-1
TestInline2.java
.../test/java/jadx/tests/integration/inline/TestInline2.java
+2
-3
TestInline3.java
.../test/java/jadx/tests/integration/inline/TestInline3.java
+1
-2
TestInline6.java
.../test/java/jadx/tests/integration/inline/TestInline6.java
+1
-2
TestInlineInLoop.java
.../java/jadx/tests/integration/inline/TestInlineInLoop.java
+1
-2
TestSyntheticInline.java
...va/jadx/tests/integration/inline/TestSyntheticInline.java
+1
-2
TestAnonymousClass.java
...java/jadx/tests/integration/inner/TestAnonymousClass.java
+1
-1
TestAnonymousClass2.java
...ava/jadx/tests/integration/inner/TestAnonymousClass2.java
+1
-2
TestAnonymousClass3.java
...ava/jadx/tests/integration/inner/TestAnonymousClass3.java
+1
-2
TestAnonymousClass4.java
...ava/jadx/tests/integration/inner/TestAnonymousClass4.java
+1
-2
TestInnerClass.java
...est/java/jadx/tests/integration/inner/TestInnerClass.java
+1
-2
TestInnerClass2.java
...st/java/jadx/tests/integration/inner/TestInnerClass2.java
+1
-1
TestInnerClass3.java
...st/java/jadx/tests/integration/inner/TestInnerClass3.java
+1
-2
TestOverloadedMethodInvoke.java
.../tests/integration/invoke/TestOverloadedMethodInvoke.java
+1
-1
TestArrayForEach.java
...t/java/jadx/tests/integration/loops/TestArrayForEach.java
+1
-2
TestArrayForEach2.java
.../java/jadx/tests/integration/loops/TestArrayForEach2.java
+1
-2
TestArrayForEachNegative.java
...adx/tests/integration/loops/TestArrayForEachNegative.java
+1
-2
TestBreakInLoop.java
...st/java/jadx/tests/integration/loops/TestBreakInLoop.java
+1
-2
TestIndexForLoop.java
...t/java/jadx/tests/integration/loops/TestIndexForLoop.java
+1
-2
TestIterableForEach.java
...ava/jadx/tests/integration/loops/TestIterableForEach.java
+1
-2
TestIterableForEach2.java
...va/jadx/tests/integration/loops/TestIterableForEach2.java
+1
-2
TestLoopCondition.java
.../java/jadx/tests/integration/loops/TestLoopCondition.java
+1
-2
TestLoopCondition2.java
...java/jadx/tests/integration/loops/TestLoopCondition2.java
+1
-2
TestLoopCondition3.java
...java/jadx/tests/integration/loops/TestLoopCondition3.java
+1
-2
TestLoopCondition4.java
...java/jadx/tests/integration/loops/TestLoopCondition4.java
+1
-2
TestLoopConditionInvoke.java
...jadx/tests/integration/loops/TestLoopConditionInvoke.java
+1
-2
TestLoopDetection.java
.../java/jadx/tests/integration/loops/TestLoopDetection.java
+1
-2
TestLoopDetection2.java
...java/jadx/tests/integration/loops/TestLoopDetection2.java
+1
-2
TestLoopDetection3.java
...java/jadx/tests/integration/loops/TestLoopDetection3.java
+1
-2
TestLoopDetection4.java
...java/jadx/tests/integration/loops/TestLoopDetection4.java
+1
-2
TestNestedLoops.java
...st/java/jadx/tests/integration/loops/TestNestedLoops.java
+1
-2
TestNestedLoops2.java
...t/java/jadx/tests/integration/loops/TestNestedLoops2.java
+1
-2
TestSequentialLoops.java
...ava/jadx/tests/integration/loops/TestSequentialLoops.java
+1
-2
TestSameMethodsNames.java
...va/jadx/tests/integration/names/TestSameMethodsNames.java
+1
-2
TestIfInTry.java
.../test/java/jadx/tests/integration/others/TestIfInTry.java
+1
-2
TestIfTryInCatch.java
.../java/jadx/tests/integration/others/TestIfTryInCatch.java
+1
-2
TestIssue13a.java
...test/java/jadx/tests/integration/others/TestIssue13a.java
+1
-2
TestIssue13b.java
...test/java/jadx/tests/integration/others/TestIssue13b.java
+1
-2
TestLoopInTry.java
...est/java/jadx/tests/integration/others/TestLoopInTry.java
+1
-2
TestLoopInTry2.java
...st/java/jadx/tests/integration/others/TestLoopInTry2.java
+1
-2
TestSwitch.java
...test/java/jadx/tests/integration/switches/TestSwitch.java
+1
-2
TestSwitchLabels.java
...ava/jadx/tests/integration/switches/TestSwitchLabels.java
+1
-1
TestSwitchNoDefault.java
.../jadx/tests/integration/switches/TestSwitchNoDefault.java
+1
-2
TestSwitchSimple.java
...ava/jadx/tests/integration/switches/TestSwitchSimple.java
+1
-2
TestSynchronized.java
.../jadx/tests/integration/synchronize/TestSynchronized.java
+1
-2
TestSynchronized2.java
...jadx/tests/integration/synchronize/TestSynchronized2.java
+1
-2
TestInlineInCatch.java
...va/jadx/tests/integration/trycatch/TestInlineInCatch.java
+1
-2
TestNestedTryCatch.java
...a/jadx/tests/integration/trycatch/TestNestedTryCatch.java
+1
-1
TestTryCatch.java
...st/java/jadx/tests/integration/trycatch/TestTryCatch.java
+1
-1
TestTryCatch2.java
...t/java/jadx/tests/integration/trycatch/TestTryCatch2.java
+1
-2
TestTryCatch3.java
...t/java/jadx/tests/integration/trycatch/TestTryCatch3.java
+1
-2
TestTryCatch4.java
...t/java/jadx/tests/integration/trycatch/TestTryCatch4.java
+1
-2
TestTryCatch5.java
...t/java/jadx/tests/integration/trycatch/TestTryCatch5.java
+1
-2
TestTypeResolver.java
...t/java/jadx/tests/integration/types/TestTypeResolver.java
+1
-2
TestInlineThis.java
...t/java/jadx/tests/integration/usethis/TestInlineThis.java
+1
-2
TestRedundantThis.java
...ava/jadx/tests/integration/usethis/TestRedundantThis.java
+1
-1
TestVariables2.java
...java/jadx/tests/integration/variables/TestVariables2.java
+1
-2
TestVariables3.java
...java/jadx/tests/integration/variables/TestVariables3.java
+1
-2
TestVariables4.java
...java/jadx/tests/integration/variables/TestVariables4.java
+1
-2
TestVariablesDefinitions.java
...tests/integration/variables/TestVariablesDefinitions.java
+1
-2
No files found.
jadx-core/src/test/java/jadx/tests/integration/TestArgInline.java
View file @
b5f439e1
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;"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/TestClassGen.java
View file @
b5f439e1
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();"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/TestDuplicateCast.java
View file @
b5f439e1
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
;
...
...
jadx-core/src/test/java/jadx/tests/integration/TestFloatValue.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
org.junit.Test
;
...
...
jadx-core/src/test/java/jadx/tests/integration/TestRedundantBrackets.java
View file @
b5f439e1
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;"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/TestRedundantReturn.java
View file @
b5f439e1
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;"
)));
}
...
...
jadx-core/src/test/java/jadx/tests/integration/TestReturnWrapping.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
org.junit.Test
;
...
...
jadx-core/src/test/java/jadx/tests/integration/TestStaticFieldsInit.java
View file @
b5f439e1
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:
...
...
jadx-core/src/test/java/jadx/tests/integration/TestStaticMethod.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
org.junit.Test
;
...
...
jadx-core/src/test/java/jadx/tests/integration/TestStringBuilderElimination.java
View file @
b5f439e1
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);"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/TestWrongCode.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/annotations/TestAnnotations.java
View file @
b5f439e1
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)"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/annotations/TestAnnotations2.java
View file @
b5f439e1
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)"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/annotations/TestParamAnnotations.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/annotations/TestVarArgAnnotation.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/arith/TestArith.java
View file @
b5f439e1
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++;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/arith/TestArith2.java
View file @
b5f439e1
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"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/arith/TestFieldIncrement.java
View file @
b5f439e1
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--;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/arith/TestFieldIncrement2.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/arith/TestSpecialValues.java
View file @
b5f439e1
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"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/arrays/TestArrayFill.java
View file @
b5f439e1
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\"};"
));
}
...
...
jadx-core/src/test/java/jadx/tests/integration/arrays/TestArrayFill2.java
View file @
b5f439e1
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};"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestCmpOp.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestCmpOp2.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions10.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions11.java
View file @
b5f439e1
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();"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions12.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions13.java
View file @
b5f439e1
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);"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions14.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions15.java
View file @
b5f439e1
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)"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions2.java
View file @
b5f439e1
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")));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions3.java
View file @
b5f439e1
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"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions4.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions5.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions6.java
View file @
b5f439e1
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"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions7.java
View file @
b5f439e1
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
(
"||"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions8.java
View file @
b5f439e1
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();"
));
}
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions9.java
View file @
b5f439e1
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');"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestElseIf.java
View file @
b5f439e1
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 {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestNestedIf.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestSimpleConditions.java
View file @
b5f439e1
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];"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestTernary.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestTernary2.java
View file @
b5f439e1
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)"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/conditions/TestTernaryInIf.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/debuginfo/TestLineNumbers.java
View file @
b5f439e1
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
;
...
...
jadx-core/src/test/java/jadx/tests/integration/debuginfo/TestLineNumbers2.java
View file @
b5f439e1
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}"
,
...
...
jadx-core/src/test/java/jadx/tests/integration/enums/TestEnums.java
View file @
b5f439e1
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
,
...
...
jadx-core/src/test/java/jadx/tests/integration/enums/TestEnums2.java
View file @
b5f439e1
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 {"
,
...
...
jadx-core/src/test/java/jadx/tests/integration/generics/TestGenerics.java
View file @
b5f439e1
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)"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/generics/TestGenerics2.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/generics/TestGenerics3.java
View file @
b5f439e1
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)"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/generics/TestGenerics4.java
View file @
b5f439e1
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 ="
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/inline/TestInline.java
View file @
b5f439e1
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
;
...
...
jadx-core/src/test/java/jadx/tests/integration/inline/TestInline2.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/inline/TestInline3.java
View file @
b5f439e1
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);"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/inline/TestInline6.java
View file @
b5f439e1
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());"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/inline/TestInlineInLoop.java
View file @
b5f439e1
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"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/inline/TestSyntheticInline.java
View file @
b5f439e1
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$"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestAnonymousClass.java
View file @
b5f439e1
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
;
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestAnonymousClass2.java
View file @
b5f439e1
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_"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestAnonymousClass3.java
View file @
b5f439e1
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();"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestAnonymousClass4.java
View file @
b5f439e1
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
)
+
"{"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestInnerClass.java
View file @
b5f439e1
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 {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestInnerClass2.java
View file @
b5f439e1
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
;
...
...
jadx-core/src/test/java/jadx/tests/integration/inner/TestInnerClass3.java
View file @
b5f439e1
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$"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/invoke/TestOverloadedMethodInvoke.java
View file @
b5f439e1
...
...
@@ -19,7 +19,7 @@ public class TestOverloadedMethodInvoke extends IntegrationTest {
public
void
method
(
Throwable
th
)
{
c
++;
if
(
th
!=
null
)
{
c
+=
100
;
c
+=
100
;
}
}
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestArrayForEach.java
View file @
b5f439e1
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;"
,
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestArrayForEach2.java
View file @
b5f439e1
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\")) {"
,
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestArrayForEachNegative.java
View file @
b5f439e1
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
(
":"
)));
}
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestBreakInLoop.java
View file @
b5f439e1
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]++;"));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestIndexForLoop.java
View file @
b5f439e1
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;"
,
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestIterableForEach.java
View file @
b5f439e1
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();"
,
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestIterableForEach2.java
View file @
b5f439e1
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)) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopCondition.java
View file @
b5f439e1
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\")"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopCondition2.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopCondition3.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopCondition4.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopConditionInvoke.java
View file @
b5f439e1
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') {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopDetection.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopDetection2.java
View file @
b5f439e1
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++) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopDetection3.java
View file @
b5f439e1
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
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestLoopDetection4.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestNestedLoops.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestNestedLoops2.java
View file @
b5f439e1
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()) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/loops/TestSequentialLoops.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/names/TestSameMethodsNames.java
View file @
b5f439e1
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();"
));
}
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestIfInTry.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestIfTryInCatch.java
View file @
b5f439e1
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 ("
));
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestIssue13a.java
View file @
b5f439e1
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
+
"\""
));
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestIssue13b.java
View file @
b5f439e1
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("
));
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestLoopInTry.java
View file @
b5f439e1
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) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestLoopInTry2.java
View file @
b5f439e1
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()) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/switches/TestSwitch.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/switches/TestSwitchLabels.java
View file @
b5f439e1
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
;
...
...
jadx-core/src/test/java/jadx/tests/integration/switches/TestSwitchNoDefault.java
View file @
b5f439e1
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);"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/switches/TestSwitchSimple.java
View file @
b5f439e1
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);"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/synchronize/TestSynchronized.java
View file @
b5f439e1
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() {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/synchronize/TestSynchronized2.java
View file @
b5f439e1
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;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestInlineInCatch.java
View file @
b5f439e1
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\", "
));
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestNestedTryCatch.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
trycatch
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
org.junit.Test
;
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestTryCatch.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
trycatch
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
org.junit.Test
;
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestTryCatch2.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
trycatch
;
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 TestTryCatch2 extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"try {"
));
assertThat
(
code
,
containsString
(
"synchronized (obj) {"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestTryCatch3.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
trycatch
;
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 TestTryCatch3 extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"try {"
));
assertThat
(
code
,
containsString
(
"exc(obj);"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestTryCatch4.java
View file @
b5f439e1
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
;
import
java.io.FileNotFoundException
;
...
...
@@ -33,7 +33,6 @@ public class TestTryCatch4 extends IntegrationTest {
disableCompilation
();
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"try {"
));
assertThat
(
code
,
containsString
(
"output = new FileOutputStream(new File(\"f\"));"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestTryCatch5.java
View file @
b5f439e1
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
;
import
java.io.FileOutputStream
;
...
...
@@ -46,7 +46,6 @@ public class TestTryCatch5 extends IntegrationTest {
disableCompilation
();
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"try {"
));
// TODO:
...
...
jadx-core/src/test/java/jadx/tests/integration/types/TestTypeResolver.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
types
;
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 TestTypeResolver 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
,
not
(
containsString
(
"= this;"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/usethis/TestInlineThis.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
usethis
;
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 TestInlineThis extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
not
(
containsString
(
"something"
)));
assertThat
(
code
,
not
(
containsString
(
"something.method()"
)));
...
...
jadx-core/src/test/java/jadx/tests/integration/usethis/TestRedundantThis.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
usethis
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
static
org
.
hamcrest
.
CoreMatchers
.
containsString
;
import
static
org
.
hamcrest
.
CoreMatchers
.
not
;
...
...
jadx-core/src/test/java/jadx/tests/integration/variables/TestVariables2.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
variables
;
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 TestVariables2 extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"Object store = s != null ? s : null;"
));
}
...
...
jadx-core/src/test/java/jadx/tests/integration/variables/TestVariables3.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
variables
;
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 TestVariables3 extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"int i;"
));
assertThat
(
code
,
containsString
(
"i = 2;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/variables/TestVariables4.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
variables
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.Method
;
...
...
@@ -60,7 +60,6 @@ public class TestVariables4 extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsString
(
"} catch (InvocationTargetException e) {"
));
assertThat
(
code
,
containsString
(
"pass = false;"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/variables/TestVariablesDefinitions.java
View file @
b5f439e1
package
jadx
.
tests
.
integration
.
variables
;
import
jadx.tests.api.IntegrationTest
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.core.dex.visitors.DepthTraversal
;
import
jadx.core.dex.visitors.IDexTreeVisitor
;
import
jadx.tests.api.IntegrationTest
;
import
java.util.List
;
...
...
@@ -38,7 +38,6 @@ public class TestVariablesDefinitions extends IntegrationTest {
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
System
.
out
.
println
(
code
);
assertThat
(
code
,
containsOne
(
indent
(
3
)
+
"for (IDexTreeVisitor pass : this.passes) {"
));
assertThat
(
code
,
not
(
containsString
(
"iterator;"
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment