Skip to content

Commit

Permalink
Merge pull request #1305 from hcoles/bug/too_much_sun
Browse files Browse the repository at this point in the history
Non jdk classes picked up by filter
  • Loading branch information
hcoles authored Feb 3, 2024
2 parents c6e250c + 9d503f6 commit 608a7e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ private static Predicate<String> commonClasses() {
glob("org.pitest.*"),
glob("java.*"),
glob("javax.*"),
glob("com.sun*"),
glob("org.junit*"),
glob("com.sun.*"),
glob("org.junit.*"),
glob("sun.*"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,19 @@ public void shouldNotCoverSunClassesWhenFilterIsBroad() {
assertThat(this.testee.getFilter().test("sun.foo.Bar")).isFalse();
}

@Test
public void shouldNotCoverDotSun() {
assertThat(this.testee.getFilter().test("com.sun.dance")).isFalse();
}

@Test
public void shouldCoverSunDance() {
assertThat(this.testee.getFilter().test("com.sundance")).isTrue();
}

@Test
public void shouldNotCoverJUnitWhenFilterIsBroad() {
assertThat(this.testee.getFilter().test("sun.foo.Bar")).isFalse();
assertThat(this.testee.getFilter().test("org.junit.Bar")).isFalse();
}

@Test
Expand Down

0 comments on commit 608a7e5

Please sign in to comment.