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
0911b2dc
Commit
0911b2dc
authored
Jul 24, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: NYI test for issue #722
parent
fd7d08cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
TestConditions19.java
...a/jadx/tests/integration/conditions/TestConditions19.java
+53
-0
No files found.
jadx-core/src/test/java/jadx/tests/integration/conditions/TestConditions19.java
0 → 100644
View file @
0911b2dc
package
jadx
.
tests
.
integration
.
conditions
;
import
org.junit.jupiter.api.Test
;
import
jadx.NotYetImplemented
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
import
static
jadx
.
tests
.
api
.
utils
.
JadxMatchers
.
containsOne
;
import
static
org
.
hamcrest
.
MatcherAssert
.
assertThat
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
public
class
TestConditions19
extends
IntegrationTest
{
public
static
class
TestCls
{
private
String
result
;
@SuppressWarnings
(
"checkstyle:InnerAssignment"
)
public
void
test
(
String
str
)
{
int
len
;
if
(
str
.
isEmpty
()
||
(
len
=
str
.
length
())
>
5
)
{
result
+=
"bad"
;
}
else
{
result
+=
"good, len: "
+
len
;
}
result
+=
", str: "
+
str
;
System
.
out
.
println
(
"done"
);
}
private
String
runTest
(
String
str
)
{
result
=
""
;
test
(
str
);
return
result
;
}
public
void
check
()
{
assertThat
(
runTest
(
""
),
is
(
"bad, str: "
));
assertThat
(
runTest
(
"1234"
),
is
(
"good, len: 4, str: 1234"
));
assertThat
(
runTest
(
"1234567"
),
is
(
"bad, str: 1234567"
));
}
}
@Test
@NotYetImplemented
(
"Inner assignment or labeled block with break"
)
public
void
test
()
{
noDebugInfo
();
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
assertThat
(
code
,
containsOne
(
"System.out.println(\"done\");"
));
}
}
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