From c75a3329b9cbb0ab912ea995dcb0c232f7f6fc95 Mon Sep 17 00:00:00 2001 From: itchyny Date: Fri, 18 Oct 2024 21:04:44 +0900 Subject: [PATCH] wrap long lines in buffer tests --- buffer/buffer_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/buffer/buffer_test.go b/buffer/buffer_test.go index 23e88d9..d830b6c 100644 --- a/buffer/buffer_test.go +++ b/buffer/buffer_test.go @@ -225,14 +225,16 @@ func TestBufferCopy(t *testing.T) { p := make([]byte, 17) _, _ = got.Read(p) if !strings.HasPrefix(string(p), testCase.expected+"\x00") { - t.Errorf("Copy(%d, %d) should clone %q but got %q", testCase.start, testCase.end, testCase.expected, string(p)) + t.Errorf("Copy(%d, %d) should clone %q but got %q", + testCase.start, testCase.end, testCase.expected, string(p)) } got.Insert(0, 0x48) got.Insert(int64(len(testCase.expected)+1), 0x49) p = make([]byte, 19) _, _ = got.ReadAt(p, 0) if !strings.HasPrefix(string(p), "H"+testCase.expected+"I\x00") { - t.Errorf("Copy(%d, %d) should clone %q but got %q", testCase.start, testCase.end, testCase.expected, string(p)) + t.Errorf("Copy(%d, %d) should clone %q but got %q", + testCase.start, testCase.end, testCase.expected, string(p)) } } } @@ -274,14 +276,16 @@ func TestBufferCut(t *testing.T) { p := make([]byte, 17) _, _ = got.Read(p) if !strings.HasPrefix(string(p), testCase.expected+"\x00") { - t.Errorf("Cut(%d, %d) should result into %q but got %q", testCase.start, testCase.end, testCase.expected, string(p)) + t.Errorf("Cut(%d, %d) should result into %q but got %q", + testCase.start, testCase.end, testCase.expected, string(p)) } got.Insert(0, 0x48) got.Insert(int64(len(testCase.expected)+1), 0x49) p = make([]byte, 19) _, _ = got.ReadAt(p, 0) if !strings.HasPrefix(string(p), "H"+testCase.expected+"I\x00") { - t.Errorf("Cut(%d, %d) should result into %q but got %q", testCase.start, testCase.end, testCase.expected, string(p)) + t.Errorf("Cut(%d, %d) should result into %q but got %q", + testCase.start, testCase.end, testCase.expected, string(p)) } } }