blob: 44661408589c90d33bacb08be4faa050e2494320 [file] [log] [blame]
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package buffer
import "testing"
func Test(t *testing.T) {
b := New()
defer b.Free()
b.WriteString("hello")
b.WriteByte(',')
b.Write([]byte(" world"))
got := string(*b)
want := "hello, world"
if got != want {
t.Errorf("got %q, want %q", got, want)
}
}