Skip to content

Commit

Permalink
Marshal Test
Browse files Browse the repository at this point in the history
Added a testing for the Marshal function within TestEncodeRoundTrip.
  • Loading branch information
samawise committed May 2, 2024
1 parent 1614aa6 commit 3fbef91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3fbef91

Please sign in to comment.