MCPcopy
hub / github.com/shopspring/decimal / TestNewFromFloatQuick

Function TestNewFromFloatQuick

decimal_test.go:156–168  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

154}
155
156func TestNewFromFloatQuick(t *testing.T) {
157 err := quick.Check(func(f float64) bool {
158 want, werr := NewFromString(strconv.FormatFloat(f, 'f', -1, 64))
159 if werr != nil {
160 return true
161 }
162 got := NewFromFloat(f)
163 return got.Equal(want)
164 }, &quick.Config{})
165 if err != nil {
166 t.Error(err)
167 }
168}
169
170func TestNewFromFloat32Random(t *testing.T) {
171 n := 0

Callers

nothing calls this directly

Calls 3

NewFromStringFunction · 0.85
NewFromFloatFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…