Skip to content

Commit

Permalink
test: update test TestAnonymousInline
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Mar 9, 2020
1 parent 37aecf7 commit f66ec91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public JadxCodeAssertions containsLines(int commonIndent, String... lines) {
return containsOnlyOnce(sb.toString());
}

public JadxCodeAssertions removeBlockComments() {
String code = actual.replaceAll("/\\*.*\\*/", "");
return new JadxCodeAssertions(code);
}

public JadxCodeAssertions print() {
System.out.println("-----------------------------------------------------------");
System.out.println(actual);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public void test() {
.containsOnlyOnce("return new Runnable() {");

assertThat(cls.reloadCode())
.removeBlockComments() // remove comment about inlined class
.print()
.containsOnlyOnce("return new Runnable() {")
.doesNotContain("AnonymousClass1");
Expand Down

0 comments on commit f66ec91

Please sign in to comment.