Package jadx.core.dex.nodes

Examples of jadx.core.dex.nodes.ClassNode


    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsOne("try {"));
    assertThat(code, containsOne("while (in.hasMore()) {"));
    assertThat(code, containsOne("decoded[in.cursor()] = DecodedInstruction.decode(in);"));
    assertThat(code, containsOne("} catch (EOFException e) {"));
View Full Code Here


    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("return new String[]{\"1\", \"2\", \"3\"};"));
  }
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertEquals(4, count(code, "break;"));
    assertEquals(1, count(code, "System.out.println(s);"));
  }
View Full Code Here

    }
  }

  @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)"));
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsOne("if (quality >= 10 && raw != 0) {"));
    assertThat(code, containsOne("System.out.println(\"OK\" + raw);"));
    assertThat(code, containsOne("qualityReading = false;"));
    assertThat(code, containsOne("} else if (raw == 0 || quality < 6 || !qualityReading) {"));
View Full Code Here

//    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("return new int[]{1, a + 1, 2};"));

    // TODO
    // assertThat(code, containsString("return new int[]{1, a++, a * 2};"));
 
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    CodeWriter codeWriter = cls.getCode();
    String code = codeWriter.toString();

    Map<Integer, Integer> lineMapping = codeWriter.getLineMapping();
    assertEquals("{8=18, 11=22, 12=23, 13=24, 14=28, 16=25, 17=26, 18=28, 21=31, 22=32}",
        lineMapping.toString());
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("public static interface I {"));
    assertThat(code, containsString(indent(2) + "int test();"));
    assertThat(code, not(containsString("public int test();")));
    assertThat(code, containsString(indent(2) + "int test3();"));
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsOne("break;"));
    assertThat(code, not(containsString("continue;")));
  }
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsOne("if (a || b > 2) {"));
    assertThat(code, containsOne("f();"));
    assertThat(code, not(containsString("return")));
    assertThat(code, not(containsString("else")));
View Full Code Here

TOP

Related Classes of jadx.core.dex.nodes.ClassNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.