MCPcopy
hub / github.com/pelletier/go-toml / TestUnmarshalFloat32

Function TestUnmarshalFloat32

unmarshaler_test.go:2666–2677  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2664}
2665
2666func TestUnmarshalFloat32(t *testing.T) {
2667 t.Run("fits", func(t *testing.T) {
2668 doc := "A = 1.2"
2669 err := toml.Unmarshal([]byte(doc), &map[string]float32{})
2670 assert.NoError(t, err)
2671 })
2672 t.Run("overflows", func(t *testing.T) {
2673 doc := "A = 4.40282346638528859811704183484516925440e+38"
2674 err := toml.Unmarshal([]byte(doc), &map[string]float32{})
2675 assert.Error(t, err)
2676 })
2677}
2678
2679func TestDecoderStrict(t *testing.T) {
2680 examples := []struct {

Callers

nothing calls this directly

Calls 2

NoErrorFunction · 0.92
ErrorFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…