mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
types: fix price heart beat alert tests
This commit is contained in:
parent
a82bc86455
commit
c2c1eca4c9
|
@ -2,6 +2,7 @@ package types
|
|||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
|
@ -9,7 +10,8 @@ import (
|
|||
)
|
||||
|
||||
func TestPriceHeartBeat_Update(t *testing.T) {
|
||||
hb := PriceHeartBeat{}
|
||||
hb := NewPriceHeartBeat(time.Minute)
|
||||
|
||||
updated, err := hb.Update(PriceVolume{Price: fixedpoint.NewFromFloat(22.0), Volume: fixedpoint.NewFromFloat(100.0)})
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, updated)
|
||||
|
|
Loading…
Reference in New Issue
Block a user