Commit 84ef6d00 authored by Ahmed Ashour's avatar Ahmed Ashour Committed by skylot

test: add test case for #596 (PR #619)

parent aa41a4d9
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);"));
}
}
.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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment