(t *testing.T)
| 229 | } |
| 230 | |
| 231 | func TestAppendFloat32(t *testing.T) { |
| 232 | f := float32(3.14159) |
| 233 | var buf bytes.Buffer |
| 234 | en := NewWriter(&buf) |
| 235 | |
| 236 | var bts []byte |
| 237 | en.WriteFloat32(f) |
| 238 | en.Flush() |
| 239 | bts = AppendFloat32(bts[0:0], f) |
| 240 | if !bytes.Equal(buf.Bytes(), bts) { |
| 241 | t.Errorf("for float %f, encoder wrote %q; append wrote %q", f, buf.Bytes(), bts) |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | func BenchmarkAppendFloat32(b *testing.B) { |
| 246 | f := float32(3.14159) |
nothing calls this directly
no test coverage detected
searching dependent graphs…