grid2: fix tests

This commit is contained in:
c9s 2022-11-08 20:09:07 +08:00
parent 4ddbeff7e4
commit f46fc7ee80
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -26,8 +26,8 @@ func TestNewGrid(t *testing.T) {
assert.Equal(t, lower, grid.LowerPrice) assert.Equal(t, lower, grid.LowerPrice)
assert.Equal(t, fixedpoint.NewFromFloat(4), grid.Spread) assert.Equal(t, fixedpoint.NewFromFloat(4), grid.Spread)
if assert.Len(t, grid.Pins, 101) { if assert.Len(t, grid.Pins, 101) {
assert.Equal(t, fixedpoint.NewFromFloat(100.0), grid.Pins[0]) assert.Equal(t, Pin(number(100.0)), grid.Pins[0])
assert.Equal(t, fixedpoint.NewFromFloat(500.0), grid.Pins[100]) assert.Equal(t, Pin(number(500.0)), grid.Pins[100])
} }
} }