您将如何测试带有专用阈值的方法?

时间:2018-09-30 15:29:12

标签: unit-testing testing

想象以下情况:

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可能会很快更改(首先是启发式更改)。

谢谢。

0 个答案:

没有答案