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
03550649
Commit
03550649
authored
Feb 04, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: add endless loop test
parent
3167cd08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
TestEndlessLoop.java
...st/java/jadx/tests/integration/loops/TestEndlessLoop.java
+42
-0
No files found.
jadx-core/src/test/java/jadx/tests/integration/loops/TestEndlessLoop.java
0 → 100644
View file @
03550649
package
jadx
.
tests
.
integration
.
loops
;
import
org.junit.Test
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
static
jadx
.
tests
.
api
.
utils
.
JadxMatchers
.
containsOne
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
import
static
org
.
junit
.
Assert
.
assertThat
;
public
class
TestEndlessLoop
extends
IntegrationTest
{
public
static
class
TestCls
{
void
test1
()
{
while
(
this
==
this
)
{
}
}
void
test2
()
{
do
{
}
while
(
this
==
this
);
}
void
test3
()
{
while
(
true
)
{
if
(
this
!=
this
)
{
return
;
}
}
}
}
@Test
public
void
test
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
assertThat
(
code
,
containsString
(
"while (this == this)"
));
}
}
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