use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestGenerics6 method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsOne("for (A a : as) {"));
// TODO: fix iterable arg type (unexpected cast to A in bytecode)
// assertThat(code, containsOne("for (I i : is) {"));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestArith2 method test.
// @Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString("return (a + 2) * 3;"));
assertThat(code, not(containsString("a + 2 * 3")));
assertThat(code, containsString("return a + b + c;"));
assertThat(code, not(containsString("return (a + b) + c;")));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestArith3 method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsOne("while (n + 4 < buffer.length) {"));
assertThat(code, containsOne("n += len + 5;"));
assertThat(code, not(containsString("; n += len + 5) {")));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestFieldIncrement method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString("instanceField++;"));
assertThat(code, containsString("staticField--;"));
assertThat(code, containsString("result += s + '_';"));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestFieldIncrement3 method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString("directVect.x = targetPos.x - newPos.x;"));
}
Aggregations