Health: fix unittests

This commit is contained in:
Christian Kamm 2022-06-21 13:02:09 +02:00
parent 6f41efad0f
commit 5dd186ac13
1 changed files with 3 additions and 3 deletions

View File

@ -998,7 +998,7 @@ mod tests {
}, },
TestHealth1Case { TestHealth1Case {
perp1: (-1, 100, 0, 0), perp1: (-1, 100, 0, 0),
expected_health: 100.0 - 1.2 * 1.0 * base_lots_to_quote, expected_health: 0.0,
..Default::default() ..Default::default()
}, },
TestHealth1Case { TestHealth1Case {
@ -1008,12 +1008,12 @@ mod tests {
}, },
TestHealth1Case { TestHealth1Case {
perp1: (10, 100, 0, 0), perp1: (10, 100, 0, 0),
expected_health: 100.0, // no health gain from positive base pos above 0 expected_health: 0.0,
..Default::default() ..Default::default()
}, },
TestHealth1Case { TestHealth1Case {
perp1: (30, -100, 0, 0), perp1: (30, -100, 0, 0),
expected_health: 0.0, // no health gain from positive base pos above 0 expected_health: 0.0,
..Default::default() ..Default::default()
}, },
]; ];