Skip to content

Commit

Permalink
补充浮点数单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
fangjw committed Jun 2, 2021
1 parent e3f5c91 commit ee3d375
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util/gutil/gutil_z_unit_comparator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
}

0 comments on commit ee3d375

Please sign in to comment.