这种assertEquals(double,double)
方法是合理的弃用.是否有替代和/或不同的方法烘焙到junit - 或者我滚动我自己的小扩展
static boolean assertEquals(double d1, double d2) {
return Math.abs(d1 - d2) < 1e-8;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4595 次 |
最近记录: |