aboutsummaryrefslogtreecommitdiff
path: root/bytesconv_test.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-02-12 14:15:28 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-02-12 14:15:28 +0200
commitbfce0fa31c455f52ceb908dbd30e2d86c44ab6fc (patch)
tree37d666672d0136a25cf72ac9ebfe26099d778be9 /bytesconv_test.go
parentSwitch from bytes.Buffer to ByteBuffer where appropriate (diff)
downloadfasthttp-bfce0fa31c455f52ceb908dbd30e2d86c44ab6fc.tar.gz
fasthttp-bfce0fa31c455f52ceb908dbd30e2d86c44ab6fc.tar.bz2
fasthttp-bfce0fa31c455f52ceb908dbd30e2d86c44ab6fc.zip
substituted bytes.Buffer by ByteBuffer in tests where appropriate
Diffstat (limited to 'bytesconv_test.go')
-rw-r--r--bytesconv_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bytesconv_test.go b/bytesconv_test.go
index 24458db..83eb3d8 100644
--- a/bytesconv_test.go
+++ b/bytesconv_test.go
@@ -77,7 +77,7 @@ func testAppendUint(t *testing.T, n int) {
}
func testWriteHexInt(t *testing.T, n int, expectedS string) {
- var w bytes.Buffer
+ var w ByteBuffer
bw := bufio.NewWriter(&w)
if err := writeHexInt(bw, n); err != nil {
t.Fatalf("unexpected error when writing hex %x: %s", n, err)
@@ -85,7 +85,7 @@ func testWriteHexInt(t *testing.T, n int, expectedS string) {
if err := bw.Flush(); err != nil {
t.Fatalf("unexpected error when flushing hex %x: %s", n, err)
}
- s := string(w.Bytes())
+ s := string(w.B)
if s != expectedS {
t.Fatalf("unexpected hex after writing %q. Expected %q", s, expectedS)
}