Skip to content

Commit

Permalink
types: tests -> test suites migration (#7405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Treglia authored Sep 29, 2020
1 parent 489599b commit ddaa3c5
Show file tree
Hide file tree
Showing 17 changed files with 675 additions and 562 deletions.
6 changes: 5 additions & 1 deletion testutil/testdata/test_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ func (msg *TestMsg) GetSignBytes() []byte {
func (msg *TestMsg) GetSigners() []sdk.AccAddress {
addrs := make([]sdk.AccAddress, len(msg.Signers))
for i, in := range msg.Signers {
addr, _ := sdk.AccAddressFromBech32(in)
addr, err := sdk.AccAddressFromBech32(in)
if err != nil {
panic(err)
}

addrs[i] = addr
}

Expand Down
4 changes: 4 additions & 0 deletions types/address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func TestAddressTestSuite(t *testing.T) {
suite.Run(t, new(addressTestSuite))
}

func (s *addressTestSuite) SetupSuite() {
s.T().Parallel()
}

var invalidStrs = []string{
"hello, world!",
"0xAA",
Expand Down
6 changes: 5 additions & 1 deletion types/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func TestCoinTestSuite(t *testing.T) {
suite.Run(t, new(coinTestSuite))
}

func (s *coinTestSuite) SetupSuite() {
s.T().Parallel()
}

// ----------------------------------------------------------------------------
// Coin tests

Expand Down Expand Up @@ -840,7 +844,7 @@ func (s *coinTestSuite) TestNewCoins() {
for _, tt := range tests {
if tt.wantPanic {
s.Require().Panics(func() { sdk.NewCoins(tt.coins...) })
return
continue
}
got := sdk.NewCoins(tt.coins...)
s.Require().True(got.IsEqual(tt.want))
Expand Down
Loading

0 comments on commit ddaa3c5

Please sign in to comment.