(t *testing.T)
| 204 | } |
| 205 | |
| 206 | func TestAppendFloat64(t *testing.T) { |
| 207 | f := float64(3.14159) |
| 208 | var buf bytes.Buffer |
| 209 | en := NewWriter(&buf) |
| 210 | |
| 211 | var bts []byte |
| 212 | en.WriteFloat64(f) |
| 213 | en.Flush() |
| 214 | bts = AppendFloat64(bts[0:0], f) |
| 215 | if !bytes.Equal(buf.Bytes(), bts) { |
| 216 | t.Errorf("for float %f, encoder wrote %q; append wrote %q", f, buf.Bytes(), bts) |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | func BenchmarkAppendFloat64(b *testing.B) { |
| 221 | f := float64(3.14159) |
nothing calls this directly
no test coverage detected
searching dependent graphs…