mirror of https://github.com/golang/go.git
net/http: correctly show error types in transfer test
actualReader and tc.expectedReader are reflect.Type instance, not the actual objects. So we need to use %s which is gonna call reflect.Type.String and give us the type name of the readers we are comparing.
This commit is contained in:
parent
0c6d8bb109
commit
d581402375
|
|
@ -267,7 +267,7 @@ func TestTransferWriterWriteBodyReaderTypes(t *testing.T) {
|
|||
}
|
||||
|
||||
if tc.expectedReader != actualReader {
|
||||
t.Fatalf("got reader %T want %T", actualReader, tc.expectedReader)
|
||||
t.Fatalf("got reader %s want %s", actualReader, tc.expectedReader)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue