mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
补充浮点数单元测试
This commit is contained in:
@ -172,8 +172,8 @@ func Test_ComparatorFloat32OfFixed(t *testing.T) {
|
||||
func Test_ComparatorFloat64OfFixed(t *testing.T) {
|
||||
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
t.Assert(gutil.ComparatorFloat32(0.1, 0.1), 0)
|
||||
t.Assert(gutil.ComparatorFloat32(1.1, 2.1), -1)
|
||||
t.Assert(gutil.ComparatorFloat32(2.1, 1.1), 1)
|
||||
t.Assert(gutil.ComparatorFloat64(0.1, 0.1), 0)
|
||||
t.Assert(gutil.ComparatorFloat64(1.1, 2.1), -1)
|
||||
t.Assert(gutil.ComparatorFloat64(2.1, 1.1), 1)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user