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, not(containsString("(!a || !b) && !c")));
    assertThat(code, containsString("return (a && b) || c;"));
  }
View Full Code Here


    }
  }

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

    assertThat(code, containsLines(2,
        "for (String s : str.split(\"\\n\")) {",
        indent(1) + "String t = s.trim();",
        indent(1) + "if (t.length() > 0) {",
View Full Code Here

    }
  }

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

    assertThat(code, containsOne("for (Authorization auth : service.getAuthorizations()) {"));
    assertThat(code, containsOne("if (isValid(auth)) {"));
    assertThat(code, containsOne("return auth.getToken();"));
  }
View Full Code Here

    }
  }

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

    assertThat(code, containsString("return null;"));
    assertThat(code, not(containsString("else")));

    // TODO: fix constant inline
View Full Code Here

    }
  }

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

    assertThat(code, containsOne("loop0:"));
    assertThat(code, containsOne("break loop0;"));

    Method test = getReflectMethod("test", int[][].class, int.class);
View Full Code Here

    }
  }

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

    assertThat(code, containsString("num >= 59 && num <= 66"));
    assertThat(code, containsString("return inRange ? num + 1 : num;"));
    assertThat(code, not(containsString("else")));
  }
View Full Code Here

    }
  }

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

    assertThat(code, containsString("return a > b;"));
    assertThat(code, containsString("return ((double) c) < d;"));
  }
View Full Code Here

    }
  }

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

    assertThat(code, not(containsString("synthetic")));
    assertThat(code, not(containsString("access$")));
    assertThat(code, not(containsString("x0")));
    assertThat(code, containsString("setC(\"c\");"));
View Full Code Here

    }
  }

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

    assertThat(code, containsOne("for (int i = 0; i < a.length; i++) {"));
//    assertThat(code, containsOne("a[i]++;"));
    assertThat(code, containsOne("if (i < b) {"));
    assertThat(code, containsOne("break;"));
View Full Code Here

    }
  }

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

    // TODO:
    assertThat(code, containsOne("return (n == null || !(arg instanceof Named)) "
        + "? false : n.equals(((Named) arg).getName());"));
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.