Skip to content

Commit 79886e9

Browse files
committed
io: use raw string literals in tests
1 parent caab405 commit 79886e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/io/io_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ func TestLimitedReader(t *testing.T) {
780780

781781
n, err := lr.Read(buf)
782782
if n != 5 || err != nil || string(buf[:5]) != "hello" {
783-
t.Errorf("Read() = (%d, %v, %q), want (5, nil, \"hello\")", n, err, buf[:5])
783+
t.Errorf(`Read() = (%d, %v, %q), want (5, nil, "hello")`, n, err, buf[:5])
784784
}
785785

786786
n, err = lr.Read(buf)
@@ -826,7 +826,7 @@ func TestLimitedReader(t *testing.T) {
826826
buf = make([]byte, 10)
827827
n, err := lr.Read(buf)
828828
if n != 5 || string(buf[:5]) != "hello" || err != nil {
829-
t.Errorf("normal Read() = (%d, %q, %v), want (5, \"hello\", nil)", n, buf[:5], err)
829+
t.Errorf(`normal Read() = (%d, %q, %v), want (5, "hello", nil)`, n, buf[:5], err)
830830
}
831831
})
832832
}
@@ -854,7 +854,7 @@ func TestLimitedReaderErrors(t *testing.T) {
854854

855855
n, err := lr.Read(buf)
856856
if n != 5 || string(buf[:5]) != "hello" || err != nil {
857-
t.Errorf("first Read() = (%d, %q, %v), want (5, \"hello\", nil)", n, buf[:5], err)
857+
t.Errorf(`first Read() = (%d, %q, %v), want (5, "hello", nil)`, n, buf[:5], err)
858858
}
859859

860860
n, err = lr.Read(buf)
@@ -870,7 +870,7 @@ func TestLimitedReaderErrors(t *testing.T) {
870870

871871
n, err := lr.Read(buf)
872872
if n != 5 || string(buf[:5]) != "hello" || err != nil {
873-
t.Errorf("first Read() = (%d, %q, %v), want (5, \"hello\", nil)", n, buf[:5], err)
873+
t.Errorf(`first Read() = (%d, %q, %v), want (5, "hello", nil)`, n, buf[:5], err)
874874
}
875875

876876
n, err = lr.Read(buf)

0 commit comments

Comments
 (0)