From edad47b5689a6c682e9aaad072448ca16ea2f8b4 Mon Sep 17 00:00:00 2001 From: zervo Date: Fri, 14 Feb 2025 12:04:11 +0100 Subject: [PATCH] Fix serializer test --- SBHPFv1/serializer_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SBHPFv1/serializer_test.go b/SBHPFv1/serializer_test.go index 6eea514..e6c649c 100644 --- a/SBHPFv1/serializer_test.go +++ b/SBHPFv1/serializer_test.go @@ -2,7 +2,6 @@ package sbhpfv1_test import ( "bytes" - "io" "slices" "testing" @@ -90,13 +89,13 @@ func TestNodeSerialization(t *testing.T) { }, } - w := io.WriteSeeker{} - err := sbhpfv1.SerializeNode(buf, &node) + var w bytes.Buffer + err := sbhpfv1.SerializeNodeStream(&w, &node) if err != nil { t.Fatalf("Node serialization failed: %v", err) } - if !slices.Equal(buf.Bytes(), node_ser_targetbytes) { - t.Fatalf("Node serialization generated bad data: %v", buf.Bytes()) + if !slices.Equal(w.Bytes(), node_ser_targetbytes) { + t.Fatalf("Node serialization generated bad data: %v", w.Bytes()) } }