Fixed misuses of fmt.Println and t.Error
This commit is contained in:
@@ -80,7 +80,7 @@ func (h *handlerSender) signal(hd Header, d []byte, buf []byte) error {
|
|||||||
dLen := len(d)
|
dLen := len(d)
|
||||||
|
|
||||||
if bufLen < dLen+1 {
|
if bufLen < dLen+1 {
|
||||||
panic(fmt.Sprintln("Sending signal %s:%d requires %d bytes of buffer, "+
|
panic(fmt.Sprintf("Sending signal %s:%d requires %d bytes of buffer, "+
|
||||||
"but only %d bytes is available", hd, d, dLen+1, bufLen))
|
"but only %d bytes is available", hd, d, dLen+1, bufLen))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func TestIntegerSingleByte1(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if mLen != 1 {
|
if mLen != 1 {
|
||||||
t.Error("Expecting the Integer to be marshalled into %d bytes, got "+
|
t.Errorf("Expecting the Integer to be marshalled into %d bytes, got "+
|
||||||
"%d instead", 1, mLen)
|
"%d instead", 1, mLen)
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -101,7 +101,7 @@ func TestIntegerSingleByte2(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if mLen != 1 {
|
if mLen != 1 {
|
||||||
t.Error("Expecting the Integer to be marshalled into %d bytes, got "+
|
t.Errorf("Expecting the Integer to be marshalled into %d bytes, got "+
|
||||||
"%d instead", 1, mLen)
|
"%d instead", 1, mLen)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user