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:
Jorropo 2022-04-14 00:54:05 +02:00
parent 0c6d8bb109
commit d581402375
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}
}