-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Find occupied test packages if targetTests not provided, the same way…
… it is done for targetClasses (#758) Find occupied test packages if targetTests not provided, the same way it is done for targetClasses
- Loading branch information
Showing
5 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
pitest-maven-verification/src/test/resources/pit-findOccupiedTestPackages/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.example</groupId> | ||
<artifactId>pitest-sample</artifactId> | ||
<version>0.1-SNAPSHOT</version> | ||
<name>pit maven findOccupiedTestPackages coverage</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.8.2</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.pitest</groupId> | ||
<artifactId>pitest-maven</artifactId> | ||
<version>${pit.version}</version> | ||
<configuration> | ||
<verbose>true</verbose> | ||
<outputFormats><value>XML</value></outputFormats> | ||
<timestampedReports>false</timestampedReports> | ||
<exportLineCoverage>true</exportLineCoverage> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
9 changes: 9 additions & 0 deletions
9
...rc/test/resources/pit-findOccupiedTestPackages/src/main/java/sources/DiscoveredClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package sources; | ||
|
||
public class DiscoveredClass { | ||
|
||
public int add(int a, int b) { | ||
return a + b; | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
...n/src/test/resources/pit-findOccupiedTestPackages/src/test/java/tests/DiscoveredTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package tests; | ||
|
||
import static junit.framework.Assert.assertEquals; | ||
|
||
import org.junit.Test; | ||
|
||
import sources.DiscoveredClass; | ||
|
||
public class DiscoveredTest { | ||
|
||
@Test | ||
public void testAdd() { | ||
assertEquals(2, new DiscoveredClass().add(1, 1)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters