Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyhyde committed Nov 27, 2024
1 parent 15936e3 commit 9b34a60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tm2/pkg/sdk/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ func TestBaseAppOptionSeal(t *testing.T) {
require.Panics(t, func() {
app.SetEndTxHook(nil)
})
require.Panics(t, func() {
app.SetGasFeeCollector(nil)
})
}

func TestSetMinGasPrices(t *testing.T) {
Expand All @@ -329,6 +332,11 @@ func TestSetMinGasPrices(t *testing.T) {
db := memdb.NewMemDB()
app := newBaseApp(t.Name(), db, SetMinGasPrices("5000stake/10gas"))
require.Equal(t, minGasPrices, app.minGasPrices)

// invalid input
_, err = ParseGasPrices("5000stake")
require.NotNil(t, err)
require.Panics(t, func() { SetMinGasPrices("5000stake") })
}

func TestInitChainer(t *testing.T) {
Expand Down

0 comments on commit 9b34a60

Please sign in to comment.