mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-25 03:56:34 +00:00
23 lines
430 B
Go
23 lines
430 B
Go
|
package crypto
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestUint160DecodeAddress(t *testing.T) {
|
||
|
addrs := []string{
|
||
|
"AMLr1CpPQtbEdiJdriX1HpRNMZUwbU2Huj",
|
||
|
"AKtwd3DRXj3nL5kHMUoNsdnsCEVjnuuTFF",
|
||
|
"AMxkaxFVG8Q1BhnB4fjTA5ZmUTEnnTMJMa",
|
||
|
}
|
||
|
for _, addr := range addrs {
|
||
|
val, err := Uint160DecodeAddress(addr)
|
||
|
if err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
assert.Equal(t, addr, AddressFromUint160(val))
|
||
|
}
|
||
|
}
|