Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
84ef6d00
Commit
84ef6d00
authored
Apr 22, 2019
by
Ahmed Ashour
Committed by
skylot
Apr 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: add test case for #596 (PR #619)
parent
aa41a4d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
TestBooleanToInt2.java
.../jadx/tests/integration/conditions/TestBooleanToInt2.java
+32
-0
TestBooleanToInt2.smali
jadx-core/src/test/smali/conditions/TestBooleanToInt2.smali
+20
-0
No files found.
jadx-core/src/test/java/jadx/tests/integration/conditions/TestBooleanToInt2.java
0 → 100644
View file @
84ef6d00
package
jadx
.
tests
.
integration
.
conditions
;
import
static
org
.
hamcrest
.
MatcherAssert
.
assertThat
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
import
org.junit.jupiter.api.Test
;
import
jadx.NotYetImplemented
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.SmaliTest
;
public
class
TestBooleanToInt2
extends
SmaliTest
{
/**
private boolean showConsent;
public void write(int b) {
}
public void writeToParcel(TestBooleanToInt2 testBooleanToInt2) {
testBooleanToInt2.write(this.showConsent ? 1 : 0);
}
*/
@Test
@NotYetImplemented
public
void
test
()
{
ClassNode
cls
=
getClassNodeFromSmaliWithPath
(
"conditions"
,
"TestBooleanToInt2"
);
String
code
=
cls
.
getCode
().
toString
();
assertThat
(
code
,
containsString
(
"write(this.showConsent ? 1 : 0);"
));
}
}
jadx-core/src/test/smali/conditions/TestBooleanToInt2.smali
0 → 100644
View file @
84ef6d00
.class public LTestBooleanToInt2;
.super Ljava/lang/Object;
.field private showConsent:Z
.method public writeToParcel(LTestBooleanToInt2;)V
.locals 0
iget-boolean p1, p0, LTestBooleanToInt2;->showConsent:Z
invoke-virtual {p0, p1}, LTestBooleanToInt2;->write(I)V
return-void
.end method
.method public write(I)V
.locals 0
return-void
.end method
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