想象以下情况:
private final double THRESHOLD = 10d;
public boolean isHighEnough(double numberOfPeople, double arg2, ...) {
return Math.pow(numberOfPeople) / 3 * arg2 ... >= THRESHOLD;
}
为isHighEnough
编写测试时,除了min(numberOfPeople = 0,arg2 = 0)和maxCase(numberOfPeople = 10 ^ 9)之外,您还会写什么东西吗,很难写 medium 进行测试,因为THRESHOULD可能会很快更改(首先是启发式更改)。
谢谢。