mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 23:42:23 +00:00
base58: add a test for a025b9c42d
As noted by @fyrchik in #579 comments.
This commit is contained in:
parent
e25133a385
commit
53e6fbbbf9
1 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestCheckEncodeDecode(t *testing.T) {
|
||||
|
@ -30,3 +31,11 @@ func TestCheckDecodeFailures(t *testing.T) {
|
|||
_, err = CheckDecode(badcsum)
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
||||
func TestBase58LeadingZeroes(t *testing.T) {
|
||||
buf := []byte{0, 0, 0, 1}
|
||||
b58 := CheckEncode(buf)
|
||||
dec, err := CheckDecode(b58)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, buf, dec)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue