From d2538839af56beb0afd6ccd461525a84258b1aaa Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 7 Feb 2017 23:33:02 +0100 Subject: [PATCH] fix byte assertion --- testing/assert/bytes.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/assert/bytes.go b/testing/assert/bytes.go index f1c5dda07..3f813557c 100644 --- a/testing/assert/bytes.go +++ b/testing/assert/bytes.go @@ -25,11 +25,12 @@ type BytesSubject struct { func (subject *BytesSubject) Equals(expectation []byte) { if len(subject.value) != len(expectation) { - subject.FailWithMessage(fmt.Sprint("Bytes arrays have differen size: expected", len(expectation), ", actual", len(subject.value))) + subject.FailWithMessage(fmt.Sprint("Bytes arrays have differen size: expected ", len(expectation), ", actual ", len(subject.value))) + return } for idx, b := range expectation { if subject.value[idx] != b { - subject.FailWithMessage(fmt.Sprint("Bytes are different:", b, "vs", subject.value[idx])) + subject.FailWithMessage(fmt.Sprint("Bytes are different: ", b, " vs ", subject.value[idx])) return } }