mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bbgo: add test Test_isNewerUpdate
This commit is contained in:
parent
8f5f5dfeed
commit
8afd3c9ee1
|
@ -64,3 +64,16 @@ func TestActiveOrderBook_pendingOrders(t *testing.T) {
|
|||
|
||||
assert.True(t, filled, "filled event should be fired")
|
||||
}
|
||||
|
||||
func Test_isNewerUpdate(t *testing.T) {
|
||||
a := types.Order{
|
||||
Status: types.OrderStatusPartiallyFilled,
|
||||
ExecutedQuantity: number(0.2),
|
||||
}
|
||||
b := types.Order{
|
||||
Status: types.OrderStatusPartiallyFilled,
|
||||
ExecutedQuantity: number(0.1),
|
||||
}
|
||||
ret := isNewerUpdate(a, b)
|
||||
assert.True(t, ret)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user