coverage: ensure classes are touched when only default constructor is covered

This commit is contained in:
Anna.Kozlova
2017-02-20 15:07:36 +01:00
parent 63ebc2505b
commit 614bf0d652
@@ -429,13 +429,17 @@ public class PackageAnnotator {
boolean touchedClass = false;
final Collection methodSigs = classData.getMethodSigs();
for (final Object nameAndSig : methodSigs) {
final int covered = classData.getStatus((String)nameAndSig);
if (covered != LineCoverage.NONE) {
touchedClass = true;
}
if (isGeneratedDefaultConstructor(psiClass, (String)nameAndSig)) {
continue;
}
final int covered = classData.getStatus((String)nameAndSig);
if (covered != LineCoverage.NONE) {
toplevelClassCoverageInfo.coveredMethodCount++;
touchedClass = true;
}
toplevelClassCoverageInfo.totalMethodCount++;
}