github.com/cosmos/cosmos-sdk@v0.50.10/types/collections_test.go (about)

     1  package types
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  
     7  	"cosmossdk.io/collections/colltest"
     8  )
     9  
    10  func TestCollectionsCorrectness(t *testing.T) {
    11  	t.Run("AccAddress", func(t *testing.T) {
    12  		colltest.TestKeyCodec(t, AccAddressKey, AccAddress{0x0, 0x2, 0x3, 0x5})
    13  	})
    14  
    15  	t.Run("ValAddress", func(t *testing.T) {
    16  		colltest.TestKeyCodec(t, ValAddressKey, ValAddress{0x1, 0x3, 0x4})
    17  	})
    18  
    19  	t.Run("ConsAddress", func(t *testing.T) {
    20  		colltest.TestKeyCodec(t, ConsAddressKey, ConsAddress{0x32, 0x0, 0x0, 0x3})
    21  	})
    22  
    23  	t.Run("AddressIndexingKey", func(t *testing.T) {
    24  		colltest.TestKeyCodec(t, LengthPrefixedAddressKey(AccAddressKey), AccAddress{0x2, 0x5, 0x8})
    25  	})
    26  
    27  	t.Run("Time", func(t *testing.T) {
    28  		colltest.TestKeyCodec(t, TimeKey, time.Time{})
    29  	})
    30  }