Skip to content

Commit

Permalink
diff-test-selection: skip parametrized for selection (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
danglotb authored Dec 18, 2020
1 parent 1cc8911 commit d05ea6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ private Map<String, Set<String>> matchChangedWithCoverage(Map<String, Map<String
Map<String, Set<String>> testClassNamePerTestMethodNamesThatCoverChanges = new LinkedHashMap<>();
for (String testClassKey : coverage.keySet()) {
for (String testMethodKey : coverage.get(testClassKey).keySet()) {
if (this.isParametrized(testMethodKey)) {
continue;
}
for (String targetClassName : coverage.get(testClassKey).get(testMethodKey).keySet()) {
if (modifiedLinesPerQualifiedName.containsKey(targetClassName)) {
for (Integer line : modifiedLinesPerQualifiedName.get(targetClassName)) {
Expand All @@ -109,6 +112,10 @@ private Map<String, Set<String>> matchChangedWithCoverage(Map<String, Map<String
return testClassNamePerTestMethodNamesThatCoverChanges;
}

private boolean isParametrized(String testMethodKey) {
return testMethodKey.contains("[") && testMethodKey.contains("] ");
}

private Map<String, List<Integer>> getModifiedLinesPerQualifiedName(String currentLine,
String secondLine) {
final File baseDir = new File(this.configuration.pathToFirstVersion);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package eu.stamp_project.diff_test_selection.coverage;

import eu.stamp_project.diff_test_selection.configuration.Options;
import org.apache.maven.plugin.logging.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down

0 comments on commit d05ea6d

Please sign in to comment.