mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
17 lines
391 B
Go
17 lines
391 B
Go
package strkey
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestDecode(t *testing.T) {
|
|
key := "ABCw4rFBR7qU2HGzHwnKLYo9mMRcjGhFK28gSy58RKc5feqz"
|
|
res, err := Decode(AccountAddressVersionByte, key)
|
|
require.NoError(t, err)
|
|
str, err := Encode(AccountAddressVersionByte, res)
|
|
require.NoError(t, err)
|
|
assert.Equal(t, key, str)
|
|
}
|