From c364648a430a5d7525a5d9149e3cd5cf5dbf42d8 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 6 Jun 2024 21:40:40 +0100 Subject: [PATCH] Output the bytes that are expected and got for encodeCompare on error --- marshal_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshal_test.go b/marshal_test.go index ba2472c..3db15a5 100644 --- a/marshal_test.go +++ b/marshal_test.go @@ -82,7 +82,7 @@ func TestStruct(test *testing.T) { return } if !bytes.Equal(res, desired) { - test.Errorf("written data not matching") + test.Errorf("written data not matching expected got: %v, expected: %v", res, desired) } } encodeCompareLE := func(s interface{}, desired []byte) { // compare with LittleEndian results