div by zero fixed

This commit is contained in:
Alexey Kudravtsev
2014-09-12 14:28:28 +04:00
parent 3f2ff912e6
commit 47b5d6d83e
@@ -413,7 +413,8 @@ public class PlatformTestUtil {
for (int i= n /2- n / part /2; i< n /2+ n / part /2; i++) {
total += time[i];
}
return total/(n / part);
int middlePartLength = n / part;
return middlePartLength == 0 ? 0 : total / middlePartLength;
}
public static boolean canRunTest(@NotNull Class testCaseClass) {