From 58163a8de3bbfb6055a95656a126359e98d59237 Mon Sep 17 00:00:00 2001 From: Tnze Date: Fri, 31 Mar 2023 23:04:00 +0800 Subject: [PATCH] fix VarInt and VarLong fuzz test error message format --- net/packet/packet_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/packet/packet_test.go b/net/packet/packet_test.go index 6982a87..5050785 100644 --- a/net/packet/packet_test.go +++ b/net/packet/packet_test.go @@ -72,7 +72,7 @@ func FuzzVarInt_Len(f *testing.F) { t.Fatal(err) } if a, b := buf.Len(), pk.VarInt(v).Len(); a != b { - t.Errorf("%#v Length calculation error: calculated to be %d, actually %d", pk.VarInt(v), b, a) + t.Errorf("VarInt(%d) Length calculation error: calculated to be %d, actually %d", v, b, a) } }) } @@ -129,7 +129,7 @@ func FuzzVarLong_Len(f *testing.F) { t.Fatal(err) } if a, b := buf.Len(), pk.VarLong(v).Len(); a != b { - t.Errorf("%#v Length calculation error: calculated to be %d, actually %d", pk.VarLong(v), b, a) + t.Errorf("VarLong(%d) Length calculation error: calculated to be %d, actually %d", v, b, a) } }) }