From 4aa2fd762d519b6493d2c2fdeed94ddcf0a142b6 Mon Sep 17 00:00:00 2001 From: XplorSam Date: Thu, 2 May 2024 17:21:55 -0600 Subject: [PATCH] Marshal Test Added a test for the Marshal function within TestEncodeRoundTrip. --- encode_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/encode_test.go b/encode_test.go index 4605e2c9..fbf17de4 100644 --- a/encode_test.go +++ b/encode_test.go @@ -53,6 +53,13 @@ func TestEncodeRoundTrip(t *testing.T) { if firstBuffer.String() != secondBuffer.String() { t.Errorf("%s\n\nIS NOT IDENTICAL TO\n\n%s", firstBuffer.String(), secondBuffer.String()) } + out, err := Marshal(inputs) + if err != nil { + t.Fatal(err) + } + if firstBuffer.String() != string(out) { + t.Errorf("%s\n\nIS NOT IDENTICAL TO\n\n%s", firstBuffer.String(), string(out)) + } } func TestEncodeArrayHashWithNormalHashOrder(t *testing.T) {