(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestUnsigned(t *testing.T) { |
| 75 | n := -1.0 |
| 76 | const supUnsigned = float64(^uint32(0)) + 1 |
| 77 | if x := math.Floor(n / supUnsigned); x != -1.0 { |
| 78 | t.Error("math.Floor(-1/supUnsigned) == ", x) |
| 79 | } |
| 80 | if x := math.Floor(n/supUnsigned) * supUnsigned; x != -4294967296.0 { |
| 81 | t.Error("math.Floor(n/supUnsigned)*supUnsigned == ", x) |
| 82 | } |
| 83 | if x := n - math.Floor(n/supUnsigned)*supUnsigned; x != 4294967295.0 { |
| 84 | t.Error("n-math.Floor(n/supUnsigned)*supUnsigned == ", x) |
| 85 | } |
| 86 | if x := uint(n - math.Floor(n/supUnsigned)*supUnsigned); x != 4294967295 { |
| 87 | t.Error("uint(n-math.Floor(n/supUnsigned)*supUnsigned) == ", x) |
| 88 | } |
| 89 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…