use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestEnumsWithConsts method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsLines(1, "public enum Direction {", indent(1) + "NORTH,", indent(1) + "SOUTH,", indent(1) + "EAST,", indent(1) + "WEST", "}"));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestSwitchOverEnum2 method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestSwitchOverEnum2.class);
String code = cls.getCode().toString();
assertThat(code, countString(1, "synthetic"));
assertThat(code, countString(2, "switch (c) {"));
assertThat(code, countString(2, "case ONE:"));
assertThat(code, countString(2, "case DOG:"));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestGenerics method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString("mthWildcard(List<?> list)"));
assertThat(code, containsString("mthExtends(List<? extends A> list)"));
assertThat(code, containsString("mthSuper(List<? super A> list)"));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestGenerics3 method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString("mthExtendsArray(List<? extends byte[]> list)"));
assertThat(code, containsString("mthSuperArray(List<? super int[]> list)"));
assertThat(code, containsString("mthSuperInteger(List<? super Integer> list)"));
assertThat(code, containsString("mthExtendsString(List<? super String> list)"));
}
use of jadx.core.dex.nodes.ClassNode in project jadx by skylot.
the class TestGenerics4 method test.
@Test
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString("Class<?>[] a ="));
assertThat(code, not(containsString("Class[] a =")));
}
Aggregations