mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
types: add TestPosition_SetClosing test
This commit is contained in:
parent
195ace63b0
commit
131345a762
|
@ -313,3 +313,15 @@ func TestPosition(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestPosition_SetClosing(t *testing.T) {
|
||||
p := NewPosition("BTCUSDT", "BTC", "USDT")
|
||||
ret := p.SetClosing(true)
|
||||
assert.True(t, ret)
|
||||
|
||||
ret = p.SetClosing(true)
|
||||
assert.False(t, ret)
|
||||
|
||||
ret = p.SetClosing(false)
|
||||
assert.True(t, ret)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user