Browse Source

[flowrate] improve error formatting (Refs #16)

pull/1842/head
Anton Kaliaev 8 years ago
parent
commit
b5c57967b7
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      flowrate/io_test.go

+ 2
- 2
flowrate/io_test.go View File

@ -91,7 +91,7 @@ func TestReader(t *testing.T) {
} }
for i, s := range status { for i, s := range status {
if !reflect.DeepEqual(&s, &want[i]) { if !reflect.DeepEqual(&s, &want[i]) {
t.Errorf("r.Status(%v) expected %v; got %v", i, want[i], s)
t.Errorf("r.Status(%v)\nexpected: %v\ngot : %v", i, want[i], s)
} }
} }
if !bytes.Equal(b[:20], in[:20]) { if !bytes.Equal(b[:20], in[:20]) {
@ -137,7 +137,7 @@ func TestWriter(t *testing.T) {
} }
for i, s := range status { for i, s := range status {
if !reflect.DeepEqual(&s, &want[i]) { if !reflect.DeepEqual(&s, &want[i]) {
t.Errorf("w.Status(%v) expected %v; got %v", i, want[i], s)
t.Errorf("w.Status(%v)\nexpected: %v\ngot : %v\n", i, want[i], s)
} }
} }
if !bytes.Equal(b, w.Writer.(*bytes.Buffer).Bytes()) { if !bytes.Equal(b, w.Writer.(*bytes.Buffer).Bytes()) {


Loading…
Cancel
Save