Skip to content

Commit

Permalink
Fix TestLittleEndianBytesToBigInt
Browse files Browse the repository at this point in the history
  • Loading branch information
PatriceVignola committed Dec 9, 2022
1 parent 345274a commit 0f94fe4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion encoding/bytesutil/bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/binary"
"fmt"
"math/big"
"reflect"
"testing"

Expand Down Expand Up @@ -640,5 +641,6 @@ func TestLittleEndianBytesToBigInt(t *testing.T) {
bytes := make([]byte, 8)
binary.LittleEndian.PutUint64(bytes, 1234567890)
converted := bytesutil.LittleEndianBytesToBigInt(bytes)
assert.Equal(t, 1234567890, converted)
expected := new(big.Int).SetInt64(1234567890)
assert.DeepEqual(t, expected, converted)
}

0 comments on commit 0f94fe4

Please sign in to comment.