chore(sap): more test for compileBlocks

This commit is contained in:
Steffen Jost 2023-10-18 15:02:20 +00:00
parent fde97b048a
commit 41cb7d2abc

View File

@ -117,9 +117,11 @@ spec = do
d3 <- arbitrary `suchThat` (d1 <) d3 <- arbitrary `suchThat` (d1 <)
d4 <- arbitrary `suchThat` (d3 <) d4 <- arbitrary `suchThat` (d3 <)
return (d1,d2,d3,d4) return (d1,d2,d3,d4)
b <- generate arbitrary b3 <- generate arbitrary
let test = compileBlocks d1 d2 [(d3,b),(d4,not b)] b4 <- generate arbitrary
result | b = [(d1, min d2 d4)] let test = compileBlocks d1 d2 [(d3,b3),(d4,b4)]
| d2 > d4 = [(d1,d3),(d4,d2)] result | b3, b4 = [(d1, d2)]
| b3 = [(d1, min d2 d4)]
| b4, d2 > d4 = [(d1,d3),(d4,d2)]
| otherwise = [(d1, min d2 d3)] | otherwise = [(d1, min d2 d3)]
test `shouldBe` result test `shouldBe` result