From eb62053c3cfb273adbc35b925cbdfdcb65597c46 Mon Sep 17 00:00:00 2001 From: Mostafa Date: Thu, 29 Aug 2024 12:35:19 +0800 Subject: [PATCH] test(crypto): update crypto tests --- crypto/address_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crypto/address_test.go b/crypto/address_test.go index 21733f8a0..028255494 100644 --- a/crypto/address_test.go +++ b/crypto/address_test.go @@ -61,6 +61,12 @@ func TestFromString(t *testing.T) { []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, crypto.AddressTypeTreasury, }, + { + "00", + bech32m.InvalidLengthError(2), + nil, + 0, + }, { "", bech32m.InvalidLengthError(0), @@ -159,7 +165,7 @@ func TestFromString(t *testing.T) { } } -func TestAddressEncoding(t *testing.T) { +func TestAddressDecoding(t *testing.T) { tests := []struct { size int hex string