(t *testing.T)
| 2664 | } |
| 2665 | |
| 2666 | func 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 | |
| 2679 | func TestDecoderStrict(t *testing.T) { |
| 2680 | examples := []struct { |