diff --git a/jadx-core/src/test/java/jadx/tests/api/utils/assertj/JadxCodeAssertions.java b/jadx-core/src/test/java/jadx/tests/api/utils/assertj/JadxCodeAssertions.java index adbe9d7d763..2c5c75baea6 100644 --- a/jadx-core/src/test/java/jadx/tests/api/utils/assertj/JadxCodeAssertions.java +++ b/jadx-core/src/test/java/jadx/tests/api/utils/assertj/JadxCodeAssertions.java @@ -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); diff --git a/jadx-core/src/test/java/jadx/tests/integration/rename/TestAnonymousInline.java b/jadx-core/src/test/java/jadx/tests/integration/rename/TestAnonymousInline.java index 71226488466..f819046bd04 100644 --- a/jadx-core/src/test/java/jadx/tests/integration/rename/TestAnonymousInline.java +++ b/jadx-core/src/test/java/jadx/tests/integration/rename/TestAnonymousInline.java @@ -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");