Skip to content

Commit

Permalink
fix cyclic import
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Oct 25, 2023
1 parent 7a58af1 commit 5147d1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/chain_id_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package types
package types_test

import (
_ "embed"
"strings"
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -94,7 +95,7 @@ func TestParseChainIDFromGenesis(t *testing.T) {

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
chain_id, err := ParseChainIDFromGenesis(strings.NewReader(tc.json))
chain_id, err := sdk.ParseChainIDFromGenesis(strings.NewReader(tc.json))
if tc.expChainID == "" {
require.Error(t, err)
require.Contains(t, err.Error(), tc.expError)
Expand All @@ -112,7 +113,7 @@ func BenchmarkParseChainID(b *testing.B) {
b.Run("new", func(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
chainId, err := ParseChainIDFromGenesis(strings.NewReader(BenchmarkGenesis))
chainId, err := sdk.ParseChainIDFromGenesis(strings.NewReader(BenchmarkGenesis))
require.NoError(b, err)
require.Equal(b, expChainID, chainId)
}
Expand Down

0 comments on commit 5147d1c

Please sign in to comment.